diff --git a/src/components/EditGrid/EditGrid.js b/src/components/EditGrid/EditGrid.js index f9ee1b3e8..751be6a76 100644 --- a/src/components/EditGrid/EditGrid.js +++ b/src/components/EditGrid/EditGrid.js @@ -21,7 +21,7 @@ const EditGrid = ({children, onAddItem, addButtonLabel}) => (
{children}
{onAddItem && ( - + diff --git a/src/components/EditGrid/EditGridButtonGroup.js b/src/components/EditGrid/EditGridButtonGroup.js index fc820c4db..b7337a44b 100644 --- a/src/components/EditGrid/EditGridButtonGroup.js +++ b/src/components/EditGrid/EditGridButtonGroup.js @@ -3,15 +3,16 @@ import PropTypes from 'prop-types'; import React from 'react'; const EditGridButtonGroup = ({children}) => { + const role = children && React.Children.count(children) > 1 ? 'group' : undefined; return ( - + {children} ); }; EditGridButtonGroup.propTypes = { - children: PropTypes.node.isRequired, + children: PropTypes.arrayOf(PropTypes.node.isRequired), }; export default EditGridButtonGroup; diff --git a/src/formio/templates/editGrid.ejs b/src/formio/templates/editGrid.ejs index cbe274638..6fede3b3d 100644 --- a/src/formio/templates/editGrid.ejs +++ b/src/formio/templates/editGrid.ejs @@ -12,7 +12,10 @@
{{row}}
{% if (ctx.openRows[rowIndex] && !ctx.readOnly) { %} -

+