react-split-pane
react-split-pane copied to clipboard
Pass down events to onDragStarted and onDragFinished
I noticed an issue on my end where the event wasn't prevented on drag start so I'd need to add event.preventDefault()
in this event listener.
But the current API doesn't pass down the events in the API so I cannot do this.
The other possibility would be do add event.preventDefault()
here
- onMouseDown={event => onMouseDown(event)}
+ onMouseDown={event => {
+ event.preventDefault();
+ onMouseDown(event);
+ }}
But this could have side effects and as functions like onResizerClick
pass down the event, I would prefer to also pass it in the drag eventlisteners