Conditional Button in a Button.Group breaks application #900
Labels
🐛 bug
Something isn't working
confirmed
This bug was confirmed
help wanted
Extra attention is needed
Steps to reproduce
<Button.Group> <Button>Not conditional</Button> { someCondition && <Button>Conditional</Button> } </Button.Group>
Current behavior
When a conditional Button is added in a Button.Group it throws
Uncaught Error: React.cloneElement(...): The argument must be a React element, but you passed null. at Object.cloneElement (react.development.js:879:11) at Object.cloneElementWithValidation (react.development.js:2413:33) at React2.cloneElement (whyDidYouRender.js:283:48) at ButtonGroup.js:7:74 at react.development.js:1158:17 at mapIntoArray (react.development.js:1049:23) at mapIntoArray (react.development.js:1099:23) at Object.mapChildren [as map] (react.development.js:1157:3) at ButtonGroup.js:7:42 at mountMemo (react-dom.development.js:17225:19)
Expected behavior
It just should or not render the conditional button
Context
Trying to add just some conditional buttons in a button group
The text was updated successfully, but these errors were encountered: