komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more
http://ka-table.com
MIT License
769 stars 56 forks source link

Reordering rows with groups #257

Open soeppe opened 1 year ago

soeppe commented 1 year ago

Hello

I am trying to reorder a tabel that has groups in it. And i was wondering if it there is a way to drag the group row.

And is it also posible to drop a row below an other row? lets say i want to place R3 after R1 Now i Can only drop R3 befor R1 and then I can drop R1 befor R3 image

komarovalexander commented 1 year ago

Hi @soeppe can I ask you to provide stackblitz example? https://stackblitz.com/edit/table-overview-ts?file=Demo.tsx

soeppe commented 1 year ago

https://stackblitz.com/edit/table-overview-ts-elh5mm?file=Demo.tsx here u go. So i want to be able to move R3 to G1 and insert it underneath R1

soeppe commented 1 year ago

Hi @komarovalexander do u have a update on the status of this issue?

komarovalexander commented 1 year ago

Hi @soeppe sorry I missed your message, Thanks for provided example I will investigate it next week

soeppe commented 1 year ago

Okay tanks!

komarovalexander commented 1 year ago

Hi @soeppe there is a workaround, you can override the default behavior of action and reducer: https://stackblitz.com/edit/table-overview-ts-u18mta?file=Demo.tsx,style.scss

in this example do not forget to disable default row reordering, to make the workaround work: rowReordering: false,

soeppe commented 1 year ago

@komarovalexander Thank u i will check this out