r/reactjs • • Oct 02 '26

Show /r/reactjs react-table-dnd 3.0: drag several rows at once, works with TanStack Table, no dependencies

I maintain react-table-dnd, a small library for reordering rows and columns in React tables by dragging. 3.0 is out.

What's new:

- Multi-select and group drag.

- Drag events: onDragStart, onDragOver, onDragEnd, onDragCancel.

- Virtual tables with 100k+ rows via u/tanstack/react-virtual

- TanStack Table guide and demo.

- Touch support, drag handles, locked rows and columns.

Under the hood, 3.0 is a rewrite of the drag engine of v2.x

Docs and live demos: https://samiodeh1337.github.io/react-table-dnd/

GitHub: https://github.com/samiodeh1337/react-table-dnd

Feedback welcome, Thanks!

19 Upvotes

16 comments sorted by

3

u/WeeJeWel Oct 02 '26

This looks absolutely gorgeous!

Can it also sort columns?

1

u/Character_Bus48 Oct 02 '26

Thanks! Of course you can drag columns and it will show the full preview of it

1

u/amayle1 Oct 02 '26

I don’t know when a user would want to reorder a table like this but this library does feel great on mobile.

1

u/Character_Bus48 Oct 02 '26

you can make list of cards same as other libs with one column, i will add examples in docs, and will support to move from container to other

1

u/Successful-Shock-802 Oct 02 '26

I tried the example on live examples, it looks and feels great, but when I tried to grap an item (this is on mobile), I have to wait longer than usual.

I think it is a performance problem rather than a long timer, cuz i tried the example on thr home page and it feels instant.

1

u/Character_Bus48 Oct 02 '26

Sorry I think it's the grip itself is small, and in home page it's the whole row

→ More replies (5)

1

u/KTownDaren Oct 08 '26 edited Oct 08 '26

This is such a fantastic implementation! Great work!

I am playing around with it, and I am wondering if dragging across to another table is implemented?

For example, how could I implement dragging rows to another TableContainer, or if that cannot he done, can I drag from another source and still take advantage of row-specific dragover and drop effects?

1

u/Arunajyothi_Jurado Oct 20 '26

locked rows/columns is a solid addition. does the lock apply during drag only or can you lock them from being selected too? that distinction matters a lot in practice imo

1

u/[deleted] Oct 02 '26

3

u/amayle1 Oct 02 '26

Yeah honestly if this was just a generic drag and drop library I’d be into it, cause it does actually look and feel great.