Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React beautiful DND - "Unable to find draggable with id: X"

I am trying to use react-beautiful-dnd for drag n drop sorting of a list but my elements are not draggable and I get Unable to find draggable with id: X. I have cross-check my code with examples in docs but unable to find what I need to fix. I am using constant id for key and draggableId prop.

Code:CodeSandBox

Edit 1: I expected the code to be able to drag and rearrange items but will return to their initial position as state update is not implemented

like image 575
Solaris Avatar asked Jan 30 '26 21:01

Solaris


1 Answers

Just ran into the same problem. Try disabling React's Strict Mode. That fixed it for me. https://reactjs.org/docs/strict-mode.html

There's an open issue for this with react-beautiful-dnd here https://github.com/atlassian/react-beautiful-dnd/issues/2350. Hopefully compatibility with strict mode will be fixed soon. Until then removing strict mode works around the issue.

like image 156
jpolete Avatar answered Feb 02 '26 12:02

jpolete



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!