-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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
[Tabs] Throw error only if individual Tab
is hidden, not the whole Tabs
#34026
Conversation
|
tabMeta && | ||
tabMeta.width === 0 && | ||
tabMeta.height === 0 | ||
tab && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not implementing the fix mentioned in the PR. Can you update the implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? Here is link to the implementation, that doesn't cause console error (https://codesandbox.io/s/relaxed-browser-ekxg7m). Suggested condition in the issue is incorrect, because it's breaking case, where tab item has set display: none
- the warning then does not appear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The solution you have is hardcoded to just check the style
attribute. There are cases where some classname is used for this behavior. This is why it's better to check the width and height of the element rendered.
If something is not working, is better to just commit the changes and we can take a look together at what needs to be fixed. Without seeing what's breaking it's hard to follow up :)
3c51a1b
to
5684b2e
Compare
@mnajdova I wrapped this up. Can you do a review? |
Tab
is hidden, not the whole Tabs
Signed-off-by: Marija Najdova <mnajdova@gmail.com>
Signed-off-by: Marija Najdova <mnajdova@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Warning conditions changed to only display when tab is not part of the document layout or is set to
display: none
(#33606)Closes #33606