Skip to content
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

fix(@clayui/tabs): fix error when trying to clone an invalid element #5173

Merged
merged 2 commits into from
Nov 3, 2022

Conversation

matuzalemsteles
Copy link
Member

Fixes #5169

This prevents the child from being cloned when it is not a valid React element. Adding conditionals in the content rendering breaks the control via index, this is not recommended. It is intentional that this happens here because we could do a filter before doing the clone but that would be a quadratic iteration that I want to avoid and we will support activating tabs in other ways with the help of the collection pattern #5172.

@matuzalemsteles matuzalemsteles merged commit 92c1eb0 into liferay:master Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@clayui/tabs: How to conditionally render tab items?
1 participant