You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tabs): respect stencil lifecycle order for tab selection (#30702)
Issue number: resolves#30611
---------
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->
<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
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?
- [ ] Yes
- [X] No
<!--
If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
## Other information
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
Current dev build:
```
8.7.6-dev.11759345401.165fca78
```
---------
Co-authored-by: ionitron <[email protected]>
0 commit comments