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

Return previous slider value in Events #1168

Open
hardnold opened this issue Oct 18, 2021 · 3 comments
Open

Return previous slider value in Events #1168

hardnold opened this issue Oct 18, 2021 · 3 comments
Labels
Feature Feature requests/suggestions

Comments

@hardnold
Copy link

hardnold commented Oct 18, 2021

This is more of a feature request rather than an issue.

It would be great if the slider would return also the previous value when an event gets triggered. Then one could check for a value change and only if values have changed, perform an action (like an ajax request) - similar to the state update procedure in react.

Currently one has to store and update the previous value in a global var to check the value in an event handler since the change event gets triggered even if the value hasn't changed.

@leongersen
Copy link
Owner

It might make sense to not fire change and set if the slider values did not change in an interaction. This already applies on calling the set method. (this would be a breaking change)

@leongersen leongersen added the Feature Feature requests/suggestions label Oct 18, 2021
@hardnold
Copy link
Author

From my perspective it would indeed make sense to always fire set (even if the value didn't change), since the value gets set no matter what the value is. But for the change event it would make sense to only fire it if the value actually has changed.

@leongersen leongersen added this to the Wishlist milestone Oct 20, 2021
@leongersen leongersen removed this from the Wishlist milestone Jul 30, 2022
@Dass1010

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature requests/suggestions
Projects
None yet
Development

No branches or pull requests

3 participants