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

[data grid] Show/Hide All Columns, if all columns are hidden, unable to restore visibility. #13583

Closed
1 task done
mparsakia opened this issue Jun 21, 2024 · 2 comments
Closed
1 task done
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Column visibility support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@mparsakia
Copy link

mparsakia commented Jun 21, 2024

Search keywords

Datagrid, DataGrid Pro

Latest version

  • I have tested the latest version

Steps to reproduce

Link to live example:
https://mui.com/x/react-data-grid/demo/

  1. Go to the demo page.
  2. Open the custom column menu.
  3. Hide all columns.
  4. Close the popover.
    Note, no columns are visible, and so there is no way to access the columns menu to restore visibility.

A refresh is required to restore, however for us who export the DataGridPro state to save/restore using local storage, there is no user friendly way to restore the columns.

Current behavior

All columns are hidden.

Expected behavior

The column visibility menu should not allow hiding all columns, and enforce the visibility of at least one column at all times, so that the column visibility menu may be accessed.

Context

The user should not be left in a state where they cannot access this menu.

Your environment

    OS: Windows 11 10.0.22631
  Binaries:
    Node: 20.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (126.0.2592.68)
  npmPackages:
    @emotion/react: ^11.11.3 => 11.11.4
    @emotion/styled: ^11.11.0 => 11.11.5
    @mui/base:  5.0.0-beta.40
    @mui/core-downloads-tracker:  5.15.19

    @mui/icons-material: ^5.14.1 => 5.15.19
    @mui/material: ^5.15.16 => 5.15.19
    @mui/private-theming:  5.15.14
    @mui/styled-engine:  5.15.14
    @mui/system: ^5.15.15 => 5.15.15
    @mui/types:  7.2.14
    @mui/utils: ^5.15.14 => 5.15.14
    @mui/x-charts: ^7.5.0 => 7.6.2
    @mui/x-data-grid:  7.6.2
    @mui/x-data-grid-pro: ^7.5.0 => 7.6.2

    @mui/x-date-pickers:  7.6.2
    @mui/x-date-pickers-pro: ^7.5.0 => 7.6.2
    @mui/x-license: ^7.2.0 => 7.6.1
    @types/react: ^18.0.0 => 18.3.3
    react: ^18.2.0 => 18.3.1
    react-dom: ^18.2.0 => 18.3.1
    typescript: ^4.4.2 => 4.9.5

Chrome 126.0.6478.62 (Official Build) (64-bit) (cohort: Stable)

Order ID or Support key 💳 (optional)

85404

@mparsakia mparsakia added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 21, 2024
@michelengelen michelengelen added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Column visibility support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/ labels Jun 22, 2024
@michelengelen michelengelen changed the title [data grid] - Show/Hide All Columns, if all columns are hidden, unable to restore visibility. [data grid] Show/Hide All Columns, if all columns are hidden, unable to restore visibility. Jun 22, 2024
@michelengelen
Copy link
Member

Thanks for raising this @mparsakia ... it is a duplicate of #13328 though!
I'll close this one in favor of the other! 👍🏼

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 22, 2024
Copy link

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@mparsakia: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Column visibility support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

2 participants