Skip to content

Do safety check for selectedIndex #732

@lutfime

Description

@lutfime

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions