vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Feature Request] Drag and Reorder v-data-table headers

Open ahummel25 opened this issue 8 years ago • 9 comments

Problem to solve

Is there any existing way to drag and reorder the data table columns along with their respective items? In looking at #2234, this functionality is great but I can't figure out a way to do this at the headers.

Proposed solution

Very similar to #2234, but with the table's headers and respective items.

Trying to get something started here...

https://codepen.io/anon/pen/yjgyqY?editors=1111

ahummel25 avatar Apr 28 '18 12:04 ahummel25

This might be possible with additional libraries, but isn't something we want to implement. Feel free to open a PR on the vuetifyjs.com repo if you come up with an example.

KaelWD avatar Jun 09 '18 13:06 KaelWD

I was looking to do the same thing today. Worked out how to get it going with sortablejs and a custom directive. In case it helps anyone else I added a Codepen here: https://codepen.io/wunderdojo/pen/XyZBmP

wunderdojo avatar Nov 22 '18 05:11 wunderdojo

Looks pretty good!

ahummel25 avatar Nov 22 '18 06:11 ahummel25

Anything new?

natalie-o-perret avatar Oct 31 '19 13:10 natalie-o-perret

It's tagged as won't fix so I'm guessing you'll need to do something like what I did. It's been working fine in production for me.

wunderdojo avatar Oct 31 '19 18:10 wunderdojo

Well, considering the number of things that needs to be implemented to achieve what we want we are considering to move to the tabulator component.

natalie-o-perret avatar Nov 06 '19 22:11 natalie-o-perret

This is a good working

frontsujdev avatar Jan 20 '20 02:01 frontsujdev

If anyone need a [email protected] version based on @wunderdojo work here is one: https://codepen.io/hercip/pen/XWXWgja line 10: <template v-slot:header="{ props: { headers } }"> is "the big change" here

hercip avatar Jun 04 '20 07:06 hercip

It would be great to have this functionality by default on Vuetify. Of course we were able to implement manually as in the examples above, but having to rewrite the slots manually can be a lot of work in complex data-tables.

@KaelWD is this still a feature you guys don't intend to implement?

MarceloLuis1997 avatar Jun 02 '21 20:06 MarceloLuis1997