When dragging the brush, the onChange callback is triggered several times during the process, which is correct, but when stop dragging an additional onChange event is triggered right after onBrushEnd.
Is this expected? Is there a workaround I can use to know when drag is finished and not receiving any additional input after finishing?
My use case is updating the main app state during onChange, and when drag ends, I want to show a tooltip with the updated state. The issue is that while dragging (onChange) I have a state with a boolean to avoid showing the tooltip until it really ends, which is inconvenient because I set it to false when onBrushEnd is triggered, but it's back to true again when the last onChange runs.
Demo (fork of Brush doc): https://codesandbox.io/p/sandbox/youthful-browser-vq8x4p

When dragging the brush, the
onChangecallback is triggered several times during the process, which is correct, but when stop dragging an additionalonChangeevent is triggered right afteronBrushEnd.Is this expected? Is there a workaround I can use to know when drag is finished and not receiving any additional input after finishing?
My use case is updating the main app state during
onChange, and when drag ends, I want to show a tooltip with the updated state. The issue is that while dragging (onChange) I have a state with a boolean to avoid showing the tooltip until it really ends, which is inconvenient because I set it tofalsewhenonBrushEndis triggered, but it's back totrueagain when the lastonChangeruns.Demo (fork of Brush doc): https://codesandbox.io/p/sandbox/youthful-browser-vq8x4p
