Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to reorder a column group? #298

Open
bawaji94 opened this issue Feb 22, 2018 · 6 comments
Open

Is it possible to reorder a column group? #298

bawaji94 opened this issue Feb 22, 2018 · 6 comments
Labels
v2.0-beta Tickets targeting the v2.0-beta branch.
Milestone

Comments

@bawaji94
Copy link

bawaji94 commented Feb 22, 2018

screen shot 2018-02-22 at 2 58 40 pm

Is there a way to have the drag and drop option for the column group just like the individual columns.

@wcjordan
Copy link
Member

It is possible, but we don't provide a drag handle for it, so you will need to add your own to your grouped header renderer and handle the reorder logic using the column props.

@quixotically may have some advice, she implemented the solution for our application. But it required sync'ing multiple grids to support grouped and non-grouped columns at the same time.

livedesign - edited

@quixotically
Copy link
Contributor

quixotically commented Feb 23, 2018

Hello @bawaji94 ,
Yes, we use a separate grid for each header in our application. Because of some existing limitations of the ColumnGroups feature of FDT, we rolled our own. The way ours works is that we override some of the FDT css so that the nongrouped top header cells can span into the bottom header when needed. We render blank cells underneath in the bottom header to keep the spacing synced with the top header. Also, we only enabled the reorder handle in the top header (which includes the tall cells), which helped with not needing extra logic to support that. But it was still a pretty involved change to get a custom group header working.

@Ninjinka
Copy link

Is it possible to view how you handle it? (the example showed in the gif)

@fonpacific
Copy link

Yeah, it would be nice to see some code on how to reorder column groups.

@angeloocana
Copy link
Contributor

I'm trying to implement that.
I don't have to much time, so I don't know when it will be ready.
I already started, the code is here: https://github.com/angeloocana/fixed-data-table-2/blob/master/examples/ReorderColumnGroupsExample.js

@wcjordan
Copy link
Member

wcjordan commented May 4, 2020

Our new reordering API should make this easier to implement. Adding v1.2 milestone so we consider this when tackling.

@wcjordan wcjordan added this to the 1.2 milestone May 4, 2020
@pradeepnschrodinger pradeepnschrodinger added the v2.0-beta Tickets targeting the v2.0-beta branch. label Jun 6, 2022
@pradeepnschrodinger pradeepnschrodinger modified the milestones: v1.2, v2.0 Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.0-beta Tickets targeting the v2.0-beta branch.
Projects
None yet
Development

No branches or pull requests

7 participants