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

visibleInShowHideMenu: false has no effect on "Show all columns" #389

Open
1 task done
matttk opened this issue Aug 12, 2024 · 1 comment
Open
1 task done

visibleInShowHideMenu: false has no effect on "Show all columns" #389

matttk opened this issue Aug 12, 2024 · 1 comment
Labels
bug Something isn't working V2 Issue with MRT V2

Comments

@matttk
Copy link

matttk commented Aug 12, 2024

mantine-react-table version

2.0.0-beta.6

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

  1. Disable a column from the show/hide menu via visibleInShowHideMenu: false.
  2. Set the column to default hidden with columnVisibility in initialState. (not necessar but easier to reproduce with this step)
  3. Click "Show all columns"

All columns appear, including the one that is not visible in the show/hide menu.

I would expect the disabled column (in the stackblitz example below, I chose name.firstName) to remain hidden, as the user cannot turn it back off, except by clicking "hide all".

As a background to why I am using this option, I want to sort the table by creation date but not show creation date to the user. If I disable sorting for creation date, the table can't be sorted by that column, so I have the column always hidden in the background, with no ability to show it. This works perfectly, until you click "show all".

Minimal, Reproducible Example - (Optional, but Recommended)

https://stackblitz.com/edit/github-rat1cb?file=src%2FTS.tsx

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

No, because I do not have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@alessandrojcm
Copy link
Collaborator

Hi, please confirm this still happens with the latest beta

@alessandrojcm alessandrojcm added bug Something isn't working V2 Issue with MRT V2 labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working V2 Issue with MRT V2
Projects
None yet
Development

No branches or pull requests

2 participants