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

[Slider]: add triggerOnDragging property for determine when to trigger onChange event on component. #1072

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mytharcher
Copy link
Contributor

In the old code, onChange event will be triggered on every mouse move. But this behavior will not be as expected in some scenario. So I added a property triggerOnDragging to control it in different mode. By default it will be false as the onChange event will only be trigger when mouse is released. When set it to true, every movement of dragging mouse will trigger onChange.

Please makes sure these boxes are checked before submitting your PR, thank you!

  • Make sure you are merging your commits to master branch.
  • Add some descriptions and refer relative issues for you PR.
  • Rebase your commits to make your pull request meaningful.
  • Make sure that your changes pass npm test, npm run lint and npm run build.

Changes in this pull request

  • Add triggerOnDragging config for Slider.
  • Simplified code.
  • Fix range example in doc.

…ger `onChange` event on component.

In the old code, `onChange` event will be triggered on every mouse move. But this behavior will not be as expected in some scenario. So I added a property (`triggerOnDragging`) to control the it in different mode. By default it will be `false` as the `onChange` event will only be trigger when mouse is released. When set it to `true`, every movement of dragging mouse will trigger `onChange`.
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