Skip to content

fix(TabPanel): add toArray to be able to filter out null children #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

kristofdombi
Copy link
Contributor

@kristofdombi kristofdombi commented Mar 26, 2018

<TabPanel /> shouldn't return any child, which has the value of null. Therefore we need to use React.Children.toArray(), which removes the null elements from this.props.children.

Reference can be found here.

Copy link
Contributor

@ruffle1986 ruffle1986 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great investigation 👍 🍻

@kristofdombi kristofdombi merged commit 2a045e3 into master Mar 26, 2018
@kristofdombi kristofdombi deleted the fix/tab/filter-null-children branch March 26, 2018 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants