I'm creating a table where the columns are resizable like the demo on the react-virtualized GitHub page using react-draggable: https://codesandbox.io/s/j30k46l7xw
However, I also want the table to support sorting.
When I add the sort
prop on the table, the sort function is called everytime a column is resized and the mouse is still inside the header column.
Check out the console log here where I have added the sort
prop to the above demo: https://codesandbox.io/s/n32x4ry1ym
Is there any way to stop the sort function from being called?
I've tried adding event.stopPropagation()
to the onStart
, onDrag
and onStop
in react-draggable.
I also found out that the react-draggable onStop
is called before react-virtualized sort
.
Any ideas?