user458975
user458975

Reputation: 35

Dragabbale won't move in react-beautiful-dnd

I'm trying to build a simple implementation of draggables in react-beautiful-dnd but apparently my draggables won't move.

Here is my sample code in CodeSandbox:

https://codesandbox.io/s/using-react-beautiful-dnd-with-hooks-zqpi9?fontsize=14&hidenavigation=1&theme=dark

Upvotes: 1

Views: 928

Answers (1)

Jax-p
Jax-p

Reputation: 8561

Just remove style attribute from child of draggable (in your case it's Block component). DnD uses its own style attribute and you override it. You have to use className instead of it.

Your example without style:
https://codesandbox.io/s/using-react-beautiful-dnd-with-hooks-1m4zm

Upvotes: 4

Related Questions