react-component / slider

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

onAfterChange not firing #659

Open geenalux opened 4 years ago

geenalux commented 4 years ago

In v9.2.3, it appears that onAfterChange is not firing. When manipulating the slider, I am seeing handleChange in my console but onAfterChange never appears afterwards.

<Slider
  min={1}
  max={1000}
  defaultValue={100}
  handleChange={value => {
    console.log('handleChange');
  }}
  onAfterChange={value => {
    console.log('onAfterChange', value);
  }}
/>
rediska1114 commented 4 years ago

Same problem. But sometimes onAfterChange fire.

v9.2.4

fvoordeckers commented 2 years ago

No activity for a long time, bug still occurring in v9.7.4

Update: After passing a callback it works fine: const onAfterChange = useCallback(() => console.log('onAfterChange'), []);