Reproduction link

Steps to reproduce
- Create Chart with Brush Component
- Call "set method" for a React useState hook from onChange of Brush component
What is expected?
It is expected, that the brush can be moved freely and the value is updated every time the Brush passes a stop on the Axis.
What is actually happening?
The Brush is reset to its initial state as soon as the onChange Method is called, hence after the Brush passes a stop on the Axis. This makes the Brush unusable, since it can only be moved one stop freely before it is reset to its initial state.
| Environment |
Info |
| Recharts |
v2.0.8 |
| React |
react/17.0.2 |
| System |
Mac OS |
| Browser |
Firefox and Chrome |
Reproduction link
Steps to reproduce
What is expected?
It is expected, that the brush can be moved freely and the value is updated every time the Brush passes a stop on the Axis.
What is actually happening?
The Brush is reset to its initial state as soon as the onChange Method is called, hence after the Brush passes a stop on the Axis. This makes the Brush unusable, since it can only be moved one stop freely before it is reset to its initial state.