icflorescu / mantine-datatable

The table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, context menus, nesting, Gmail-style batch row selection, dark theme, and more.
https://icflorescu.github.io/mantine-datatable/
MIT License
950 stars 68 forks source link

Dragging & Toggling feature #483

Closed gfazioli closed 11 months ago

gfazioli commented 11 months ago

In this draft, I have added two new features: the ability to drag & drop columns to order them, and the option to show or hide columns. In this version, I use a context/Provider at the top of the column header. However, it could also be removed and directly modify the relevant component.

image image image
icflorescu commented 11 months ago

Wow! This is by far the best PR I've seen ever! Thanks a lot for taking the time to come up with the code and the usage examples!

icflorescu commented 11 months ago

This will definitely go into v7.3; will publish it later today. Thanks again for your effort!

icflorescu commented 11 months ago

I'll do the necessary adjustments to export the useDragToggleColumns hook from mantine-datatable and a few minor code-style changes; I hope you won't mind ;-)