added key value for child in list

This commit is contained in:
Florian Scholdei
2019-08-20 15:19:02 +02:00
parent 65b59d1aec
commit 3f183f9f6c

View File

@@ -14,7 +14,7 @@ class ButtonGroup extends React.Component<Props> {
const childWrapper = [];
React.Children.forEach(children, child => {
if (child) {
childWrapper.push(<p className="control">{child}</p>);
childWrapper.push(<p className="control" key={childWrapper.length}>{child}</p>);
}
});