react-component / slider

React Slider
https://slider.react-component.now.sh/
MIT License
3.02k stars 763 forks source link

Why onAfterChange deprecated? #938

Closed Enkratia closed 11 months ago

Enkratia commented 11 months ago

'onAfterChange' is deprecated.ts(6385) Slider.d.ts(37, 9): The declaration was marked as deprecated here.

Why onAfterChange is deprecated? Right now just one event (onChange) is available?

yoyo837 commented 11 months ago

onChange is enough.

antoineol commented 10 months ago

Hi there! I have a use case where onChange does not fit my need. I need to wait for the user to finish choosing a value, then auto-send + close a popover containing the slider. onChange does not allow to do that (at least not in a clean way), and onAfterChanges does it perfectly.

I would suggest not to deprecate it. Maybe document, instead, that onChange should be preferred over onAfterChange for most use cases. Does it sound reasonable?

alexandermirzoyan commented 6 months ago

@antoineol can you use onChangeComplete?