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

Do safety check for selectedIndex #732

Open
lutfime opened this issue Sep 26, 2024 · 0 comments
Open

Do safety check for selectedIndex #732

lutfime opened this issue Sep 26, 2024 · 0 comments

Comments

@lutfime
Copy link

lutfime commented Sep 26, 2024

I'm passing selectedIndex binding to PageView and using dynamic items. In initial load the items is not yet loaded with 0 items, the app crash because there is no safety check in func select(index: Int, animated: Bool = false).

Another occurrence is when I dismiss the view selectedIndex is out of bound, not sure why but should check for item count and do safety check.

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

No branches or pull requests

1 participant