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

GridModel should have a 'hideGroupByCols' option #1369

Open
febbraiod opened this issue Sep 24, 2019 · 10 comments · May be fixed by #2963
Open

GridModel should have a 'hideGroupByCols' option #1369

febbraiod opened this issue Sep 24, 2019 · 10 comments · May be fixed by #2963

Comments

@febbraiod
Copy link
Member

febbraiod commented Sep 24, 2019

EXT has this, but ag-grid requires you to hide the columns manually after grouping. We can set hidden on our columns in the grid model, but would be nice if the groupBy method could do this for you automatically if you so choose.

@lbwexler
Copy link
Member

So Petra found a very specifc and exciting option in agGrid: suppressMakeColumnVisibleAfterUnGroup after a bit of troubleshooting with the name (they misspelled it in their own documentation) she was able to determine that it solves this issue for us:

We are considering the following approach, that would make it the default behavior:
#1715

But I now that might be too blunt, for existing grids that are relying on setting the initial grouped column to hidden, and using this behavior, to have only the currently grouped column hidden.

Perhaps we should go ahead and add the option Don suggests, but making it do everything it needs to do would be a lot more work that what we have in the current PR.

@petradish
Copy link
Contributor

Currently, if the user hides a column, then groups and ungroups that field, not only does the column appear visible but it also remains "Available" and does not show as "Displayed" on the column chooser.

@amcclain
Copy link
Member

@petradish - could you take a few minutes to update this ticket with the current status? Unclear from the history here what (if anything) PR #1715 changed w.r.t. auto-hiding of groupBy columns.

@amcclain amcclain added this to the Medium Term milestone May 19, 2021
@amcclain amcclain changed the title GridModel should have a 'hideGroupByCols' option. GridModel should have a 'hideGroupByCols' option May 19, 2021
@petradish
Copy link
Contributor

@petradish - could you take a few minutes to update this ticket with the current status? Unclear from the history here what (if anything) PR #1715 changed w.r.t. auto-hiding of groupBy columns.

sure thing! will check up on this ticket later today

@petradish
Copy link
Contributor

PR #1715 set the agOption suppressMakeColumnVisibleAfterUnGroup: true on our DataView component to support grouping on hidden columns. Without it, ungrouping in ag-grid has the default behavior of making the column visible (and for DataView, we want all but the 1 synthetic column hidden).

For Grid there is no default hiding of columns when a grid is grouped by them. From my understanding, this ticket would like that feature to be added (perhaps as some hideWhenGrouped config on column). The question is, if we do support that, what should happen when that column is ungrouped? Should it remain hidden, become visible, or return to its hidden/visible state before it became a grouped column)

Another orthogonal issue/bug that was discovered relating to ag-grid's default behavior of making a column visible after it is ungrouped, is that our ColChooser does not correctly reflect the visible state of an ungrouped column if it had been hidden while grouped. I could create a new ticket for that bug, or address this in the PR that would eventually resolve this ticket.

@amcclain amcclain modified the milestones: Medium Term, v48 Feb 1, 2022
@amcclain
Copy link
Member

amcclain commented Feb 2, 2022

Bumping to v48 as this came up in client QA - change to groupBy causing outgoing groupBy col to show unexpectedly, including unsupported state within the column chooser

@amcclain amcclain added the bug label Feb 2, 2022
@lbwexler
Copy link
Member

lbwexler commented Feb 8, 2022

We have another usage of suppressMakeColumnVisibleAfterUnGroup: true in the TODO app, to support hidden column grouping. Noting that here so that we clean it up if we do something better here. Its the ugliest option name I have ever seen in 30 years of working with GUI toolkits.

@lbwexler lbwexler modified the milestones: v48, v49 Apr 14, 2022
@amcclain
Copy link
Member

Just hit this annoying bug again in a client app, FYI

@petradish
Copy link
Contributor

looking now!

@lbwexler lbwexler modified the milestones: v49, v50, v51 Jul 12, 2022
@saba-mo saba-mo removed this from the v51 milestone Dec 1, 2022
@ghsolomon
Copy link
Contributor

Upvoting this ticket since I just ran into the same issue of our Hoist Grid col-visibility state being out of sync with AG-Grid's and leading to some unexpected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants