react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Draggable component freezes when content is changing dynamically.

Open jgeliberte opened this issue 4 years ago • 2 comments
trafficstars

The matchesSelectorAndParents to function throws error when the querySeelctor.all() is being called. This only happens when the Draggable component uses handle / cancel.

jgeliberte avatar Nov 29 '20 11:11 jgeliberte

Can you show an example in CodeSandbox where the current version crashes? Also, could you add a test?

STRML avatar Nov 29 '20 15:11 STRML

i could not replicate this bug on a fresh installed mui-datatables and react-draggable however. On my local setup, i checked all components affected by the draggable component and the mui-datatable is the culprit when changing the content of the datable.

This is the error shown when the datatable rows changed (changed to 25 to 50 rows per page). image

And noticed that the domfns.js on function matchesSelectorAndParentsTo it does not handle null values. so by adding a try catch or handling the null value and returning it false fixed the error.

jgeliberte avatar Nov 30 '20 06:11 jgeliberte