Skip to content

fix(ios): avoid setting selected-index before setup has finished. #7925

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
Oct 16, 2024

Conversation

asafkorem
Copy link
Collaborator

This fixes the issue mentioned on #7921, #7922 and #7924.

This prevents the bug of loading of the tab from index 0 immediately after calling the super init regardless of the custom initial rendered tab. More specifically, the original issue was the method setSelectedIndex was called immediately when calling to the super initializer with a 0 value regardless of the initial currentTabIndex value.

After this fix, changing the selectedIndex with the non-initial value from options will not have any effect before the setup has finished.

This fixes the issue mentioned on #7921, #7922 and #7924.

Changing the `selectedIndex` will not have any effect before the setup has finished,
 the original issue was the method `setSelectedIndex` was called immediately when calling
 to the `super` initializer with a `0` value regardless of the initial `currentTab`.

This prevents the loading of the tab from index `0` regardless of the custom initial rendered tab.
@asafkorem asafkorem self-assigned this Oct 16, 2024
@asafkorem asafkorem merged commit ac26b03 into master Oct 16, 2024
6 checks passed
@asafkorem asafkorem deleted the fix/switchToTab-issue branch October 16, 2024 14:53
@asafkorem
Copy link
Collaborator Author

asafkorem commented Oct 16, 2024

Released with v7.40.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant