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 not send onSlidingCompleted when value is changed programmatically #489

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

BartoszKlonowski
Copy link
Member

This pull request fixes #487
It prevents from sending the onSlidingCompleted event when value is not changed by manual dragging.

This change was implemented according to other platforms so that the behavior is constant across platforms: The controlledValue feature will not trigger any event. Events are reserved for manual dragging or tapping.

Issue487-Fix-Demo.mov

This change has been also reflected in the documentation.

@BartoszKlonowski BartoszKlonowski merged commit 9ed372d into main Jan 27, 2023
@laurent22
Copy link

Isn't it a breaking change?

@BartoszKlonowski
Copy link
Member Author

Isn't it a breaking change?

Hello @laurent22! No, not really. Same as on iOS and other platforms - the programmatic change of value prop should not trigger the onSlidingCompleted. Changing value programmatically is not a sliding so this event would be misleading. Moreover, if developer changes the value programmatically then it should be intentional hence well known that it happened, so no need to notify about it by sending any sliding or dragging-related event.
I hope it does answer your concerns.

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

Successfully merging this pull request may close these issues.

Changes in value trigger onSlidingComplete callback for Android
2 participants