Skip to content

Conversation

@zachkirsch
Copy link

Currently, when the Slider is disabled, onSlidingStart() is called when the user touches the Slider, but onSlidingComplete() is never called. This behavior is a bit inconsistent.

With this PR, when Slider is disabled, the Slider will not register any touch events (neither onSlidingStart() nor onSlidingComplete() are called). Another solution is to call onSlidingStart() when the user touches the slider and onSlidingComplete() when the slider is released (regardless of whether the Slider is disabled).

I took my approach since when the Slider is disabled, no sliding can take place, so there's no concept of a slide "starting" or "completing." A benefit of the other approach is that it makes it easy to respond when a user tries to slide the Slider when it's disabled.

If you'd prefer approach #2, I'm happy to modify the PR.

If you think things are best how they are now, I think the README should be updated to clarify the behavior.

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.

1 participant