-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(tabs): respect stencil lifecycle order for tab selection #30702
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
These screenshots are correct now. They were broken before, but I guess we didn't notice when we approved them. The first tab is selected per the code, so this was committed in the wrong state.
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.
These screenshots are correct now. They were broken before, but I guess we didn't notice when we approved them. The first tab is selected per the code, so this was committed in the wrong state.
Issue number: resolves #30611
What is the current behavior?
Currently, the way tabs are set in the tab bar abuses a bug that existed in older versions of Stencil where children would be rendered out of the correct order. This worked in the tab and tab bar's favor previously, but after the fix it broke our implementation so tabs would no longer correctly indicate the selected tab on direct navigation.
What is the new behavior?
We had a temporary fix before we knew what actually caused this issue before, which was basically just a timeout. That blindly worked because it triggered after the child was fully rendered. This change embraces the new, and correct, way these components render and triggers tab updates correctly.
Does this introduce a breaking change?
Other information
Current dev build: