tajo / react-movable

🔀 Drag and drop for your React lists and tables. Accessible. Tiny.
https://react-movable.pages.dev
MIT License
1.55k stars 51 forks source link

Nested sortable table with drag handle: dragging children table row moves parent table row #83

Closed yann-combarnous closed 3 months ago

yann-combarnous commented 2 years ago

Have not had a chance to create a Sandbox yet, but just reporting in case there is a trivial workaround.

I have a use case of having a table with sortable rows, which each row containing another table with sortable row. I am using drag handle (data-movable-handle).

In this case, I see the issue that dragging one row from the nested table sometimes drags the parent row from the parent table. Would there be an easy workaround for fixing this?

Maybe providing the ability to customize the "data-movable-handle" property name so there is no conflict between the 2 components?

ido-journey commented 1 year ago

having the same issue using a simple nested mapped list.

tajo commented 3 months ago

Please add repro with https://stackblitz.com/edit/react-movable?file=src%2FApp.tsx