Skip to content

Conversation

@vsandvold
Copy link
Contributor

@vsandvold vsandvold commented Mar 15, 2022

This PR makes the slider call onChange also when the user clicks on the slider track, not just after dragging the slider thumbs.

Problem:
When clicking the slider track, onChange is not called, even though the input values are changed (and onInput is called). This prevents the eg. the search result page from updating the user's search when clicking on a slider filter.

Solution:
Since active is true while the user interacts with the slider, and false afterwards, we can use this state to trigger the onChange callback.

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