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

Code crash if user "hides" multiple DataGrid columns #876

Closed
Furqan-Syed opened this issue Jan 19, 2021 · 2 comments
Closed

Code crash if user "hides" multiple DataGrid columns #876

Furqan-Syed opened this issue Jan 19, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@Furqan-Syed
Copy link

  • [x ] The issue is present in the latest release.
  • [ x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

If user tries to hide too many columns on a large DataGrid which exceeds the width of screen, the code will crash and give error of "TypeError Cannot read property 'width' of undefined"

Expected Behavior 🤔

User should be able to hide more than 6 rows on a table regardless of the table's width

Steps to Reproduce 🕹

You can see this with the demo table for "Custom filter operator" at https://material-ui.com/components/data-grid/filtering/ (It's the fourth table on the page)
Attempt to hide the first 6 columns and an error will pop up.
Here is the code sandbox for that sample table: https://material-ui.com/components/data-grid/filtering/

Context 🔦

Trying to use Datatable to display data with many columns.

@oliviertassinari oliviertassinari transferred this issue from mui/material-ui Jan 19, 2021
@DanailH
Copy link
Member

DanailH commented Jan 19, 2021

Hi @Furqan-Syed thanks for reporting this, we are aware of the problem. There is already a PR opened with a fix. You can follow it here #875. Also, this is a duplicate of this #856

@DanailH DanailH added the duplicate This issue or pull request already exists label Jan 19, 2021
@oliviertassinari
Copy link
Member

Duplicate of #856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants