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

Show / hide all buttons don't set header group visibility state #1014

Conversation

ThisIsHG
Copy link
Contributor

This PR is related to #1013

Copy link

vercel bot commented Feb 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
material-react-table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 9:13am
material-react-table-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 9:13am

@KevinVandy
Copy link
Owner

I'm actually thinking of reverting all this new logic in MRT. I think that TanStack Table's APIs should handle this.

Though can you tell me what the use case is for seeing whether or not column groups are visible?

@ThisIsHG
Copy link
Contributor Author

@KevinVandy
We have a table with repeating column groups with the following leaf columns:

Evaluation Detail A Detail B Detail ...

for those where a evaluation is present only the evaluation should be visible by default and for those without the details should be always visible.

We also implemented a detail switch wich shows those columns where a evaluation is present.

But when a column group is hidden as a whole and the detail view is enabled those column groups which should remain hidden appear again because there is no other way of determining if those columns should be set to visible again since we can't rely on the Evaluation column.

@KevinVandy
Copy link
Owner

@ThisIsHG I think I'll just change TanStack Table like this:
image

image

@KevinVandy
Copy link
Owner

@ThisIsHG If v2.12.1 works for you, we can close this PR.

@ThisIsHG
Copy link
Contributor Author

Will validate it first thing in morning tomorrow! But thanks in advance!

@ThisIsHG
Copy link
Contributor Author

@KevinVandy works like a charm!

Thanks for bringing it so fast into the Table!

@ThisIsHG ThisIsHG closed this Feb 29, 2024
@ThisIsHG ThisIsHG deleted the fix-show-hide-all-button-header-group-visibility-state branch February 29, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants