-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
Description
I would suggest adding an option to fire event passed by props on handleDragEnd callback, rather than onChange.
In my specific case, there's quite a resource consuming real-time filtering process, which hangs the browser as there is a tremendous amount of events fired while dragging the slider.
This is how I see it:
handleDragEnd(e) {
document.removeEventListener('mousemove', this.handleDrag);
document.removeEventListener('mouseup', this.handleDragEnd);
if(this.props.onDragEnd) {
this.props.onDragEnd({x: x, y: y});
}
},
In this case, it will be possible to omit the onChange callback, but use the onDragEnd only, which will fire only when dragging is finished.