- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 476
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Add a conditional Button in a Button.Group
<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