ElemeFE / element-react

Element UI
https://elemefe.github.io/element-react/index
MIT License
2.83k stars 444 forks source link

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

Open mytharcher opened 4 years ago

mytharcher commented 4 years ago

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!

Changes in this pull request