{"action":"created","issue":{"url":"https://api.github.com/repos/react-materialize/react-materialize/issues/178","repository_url":"https://api.github.com/repos/react-materialize/react-materialize","labels_url":"https://api.github.com/repos/react-materialize/react-materialize/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/react-materialize/react-materialize/issues/178/comments","events_url":"https://api.github.com/repos/react-materialize/react-materialize/issues/178/events","html_url":"https://github.com/react-materialize/react-materialize/pull/178","id":191707513,"number":178,"title":"Fixed bug with dynamic children in Collapsible","user":{"login":"mihaibogdan10","id":2984085,"avatar_url":"https://avatars.githubusercontent.com/u/2984085?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaibogdan10","html_url":"https://github.com/mihaibogdan10","followers_url":"https://api.github.com/users/mihaibogdan10/followers","following_url":"https://api.github.com/users/mihaibogdan10/following{/other_user}","gists_url":"https://api.github.com/users/mihaibogdan10/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaibogdan10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaibogdan10/subscriptions","organizations_url":"https://api.github.com/users/mihaibogdan10/orgs","repos_url":"https://api.github.com/users/mihaibogdan10/repos","events_url":"https://api.github.com/users/mihaibogdan10/events{/privacy}","received_events_url":"https://api.github.com/users/mihaibogdan10/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-25T13:57:33Z","updated_at":"2016-11-28T10:21:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/react-materialize/react-materialize/pulls/178","html_url":"https://github.com/react-materialize/react-materialize/pull/178","diff_url":"https://github.com/react-materialize/react-materialize/pull/178.diff","patch_url":"https://github.com/react-materialize/react-materialize/pull/178.patch"},"body":"A React component's children can sometimes be `null`, e.g. when adding children dynamically based on a condition. Added a filter before rendering them in Collapsible.\r\n\r\nExample use case that triggered the bug:\r\n```js\r\nlet item2 = null;\r\nif (condition) {\r\n    item2 = <BaseItem eventKey=\"item2\"  />;\r\n}\r\n\r\n<Collapsible accordion>\r\n    <BaseItem eventKey=\"item1\" />\r\n    {item2}\r\n</Collapsible>\r\n```\r\n\r\nAlso, cleared the `key` and `ref` passed to `React.cloneElement`, because [according to the docs](https://facebook.github.io/react/docs/react-api.html#createelement), `key` and `ref` will be preserved anyway."},"comment":{"url":"https://api.github.com/repos/react-materialize/react-materialize/issues/comments/263234454","html_url":"https://github.com/react-materialize/react-materialize/pull/178#issuecomment-263234454","issue_url":"https://api.github.com/repos/react-materialize/react-materialize/issues/178","id":263234454,"user":{"login":"alextrastero","id":4152819,"avatar_url":"https://avatars.githubusercontent.com/u/4152819?v=3","gravatar_id":"","url":"https://api.github.com/users/alextrastero","html_url":"https://github.com/alextrastero","followers_url":"https://api.github.com/users/alextrastero/followers","following_url":"https://api.github.com/users/alextrastero/following{/other_user}","gists_url":"https://api.github.com/users/alextrastero/gists{/gist_id}","starred_url":"https://api.github.com/users/alextrastero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextrastero/subscriptions","organizations_url":"https://api.github.com/users/alextrastero/orgs","repos_url":"https://api.github.com/users/alextrastero/repos","events_url":"https://api.github.com/users/alextrastero/events{/privacy}","received_events_url":"https://api.github.com/users/alextrastero/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T10:21:11Z","updated_at":"2016-11-28T10:21:11Z","body":"This looks good, what warning?"}}
{"actor":{"display_login":"alextrastero"}}