In this tutorial, I show you how to implement drag-and-drop functionality to reorder columns in a React table using DnD Kit. Starting with a basic table, I'll transform it into an interactive component with smooth horizontal drag capabilities and proper visual feedback.
Chapters:
00:00 - Intro
01:28 - Which toolkit are we using?
03:11 - Getting drag & drop working
13:26 - Customize drag overlay
Useful Links:
Infinite scroll tutorial:
https://youtu.be/XQgVyA8-Vtk
dndkit: https://dndkit.com/
Starter project: https://github.com/TheDevLogger/column-reorder-start
Complete project: https://github.com/TheDevLogger/column-reorder-complete
Tanstack Virtual: https://tanstack.com/virtual/latest
Tanstack Table: https://tanstack.com/table/latest
Tanstack Query: https://tanstack.com/query/latest
🔥 Subscribe: http://youtube.com/@TheDevLogger?sub_confirmation=1
Instagram: @thedevlogger
email:
[email protected]