-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
[BUG] Quick sliding to the top and bottom, do not adjust this method "onPageChanged" #303
Comments
I can confirm that there is an issue with the 'onPageChanged' handler. Describe the bugThe 'onPageChanged' callback (PagerContent.swift:232) is not called in the event of gestures followed quickly by each other. Therefore, the app is not able to react on index change updates. To Reproduce
Expected behavior'onPageChanged' handler will be called on every page index change. Environment:OS: iOS 16 Additional contextThe SwiftUIPager detects both Drag Gestures and finishes both with 'onDragGestureEnded' (PagerContent.swift:373). The 'onAnimationCompleted' (PagerContent.swift:227) observer triggers only once, which is totally fine. But the second 'onDragGestureEnded' call sets |
Page.pageIncrement will be reset to 0 only after ‚onPageChanged‘ has been called.
We really need this fix. For now we're pointing to the forked commit (thank you @geraldvoit !!!) but we would really like to have the fix in an official release of the library. Is there any chance this will happen? |
Page.pageIncrement will be reset to 0 only after ‚onPageChanged‘ has been called.
Hello, @fermoya. Can you create a new release of the library with this fix, please🙏 |
Hello, guys, if somebody needs to fix this issue quickly, so just instead of using use this:
and this workaround in your ViewModel:
|
Quick sliding, do not adjust this method "onPageChanged"
The text was updated successfully, but these errors were encountered: