ValentinH / react-easy-sort

A React component to sort items in lists or grids
https://ValentinH.github.io/react-easy-sort
MIT License
160 stars 25 forks source link

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. #6

Closed kennaku1 closed 3 years ago

kennaku1 commented 3 years ago

I am seeing this error when dragging elements within my list. The sorting is correct and the elements are moving as expected but I am getting this error after dropping my element

Expected behavior image

ValentinH commented 3 years ago

Are you able to reproduce this on one of the examples of our storybook? Do you have this on multiple browsers?

Ideally, could you please create a sandbox reproducing the problem?

kennaku1 commented 3 years ago

I was able to fix this issue by adding a missing key to a parent element. Thanks!

ValentinH commented 3 years ago

Do you mean that it was a parent created inside a .map() that was missing a key?

darrenjacoby commented 2 years ago

I'm getting the same error, seems like a pretty standard setup. @kennaku1, would you mind elaborating more on your solution?

ValentinH commented 2 years ago

Could you please create a sandbox reproducing the problem?

sidpremkumar commented 4 months ago

Incase anyone finds this, for me it might have been adding

 customHolderRef={mainRef}

field to the SortableList that references the parent div.

Not 100% sure yet, but it feels like it has stopped happening.