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

Selection binding brakes swiping #9

Closed
planecore opened this issue Oct 27, 2020 · 2 comments
Closed

Selection binding brakes swiping #9

planecore opened this issue Oct 27, 2020 · 2 comments

Comments

@planecore
Copy link

planecore commented Oct 27, 2020

That's what happens when I try to scroll between several pages with selection binding:

Video:
https://streamable.com/aiva4p

Code:

struct TestView: View {
    @State var selectedIdx = 0

    var body: some View {
        iPages(selection: $selectedIdx) {
            Color.red
            Color.blue
            Color.yellow
        }
        .onChange(of: selectedIdx) { value in
            print("INDEX: \(value)")
         }
    }
}
@blsage
Copy link
Owner

blsage commented Oct 27, 2020

Very interesting. I was able to reproduce the error. Quick question, is this also only happening for you when you use the .onChange receiver? I will look into this.

@blsage
Copy link
Owner

blsage commented Nov 4, 2020

Honestly thanks for this. Made me realize there was a flaw in iPages that was affecting a lot of places. I restructured things a bit and I'm not getting this bug anymore. It should be fixed.

@blsage blsage closed this as completed Nov 4, 2020
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

2 participants