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] Column Menu Positioning in MUI DataGridPremium #15264

Open
Iuli1478 opened this issue Nov 4, 2024 · 2 comments
Open

[data grid] Column Menu Positioning in MUI DataGridPremium #15264

Iuli1478 opened this issue Nov 4, 2024 · 2 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! v5.x v6.x v7.x

Comments

@Iuli1478
Copy link

Iuli1478 commented Nov 4, 2024

Continuing from this bug: #15121

Steps to reproduce

Open a DataGridPremium with several columns.
Scroll the grid to a point where one of the column headers is near the bottom of the viewport.
Make sure the grid is displayed in a viewport where there isn’t enough space either above or below for the menu to fully open.
Click the column menu button (three dots) to open the menu.
Notice that the menu extends below the screen and is not fully visible.
Try scrolling the page; the menu will close automatically.

Current behavior

The menu extends below the screen when it doesn’t fit in the available space, causing some options to be inaccessible. Attempting to scroll the page to reach those hidden options causes the menu to close, making it impossible to select those menu items.

Expected behavior

The column menu should automatically reposition itself to fit within the visible viewport. For example, it could:
Open upwards if there's not enough space below.
Introduce an internal scroll for the menu itself if there isn’t enough space either above or below.

Context

Мenu currently behaves correctly when there is enough space. It positions itself either above or below the grid as expected. However, in our specific case, the menu does not fit either above or below the screen. In such a situation, I would expect the menu to:

Appear centered within the available viewport space or
Provide a vertical scroll to access all the options.
This is a real-world scenario for us, and I hope we can find a fix or a workaround to handle this case effectively.

Your environment

System: OS: Windows 10 64-bit CPU: Intel Core i7-9700K Memory: 16 GB RAM

Binaries: Node: 16.14.0 - C:\Program Files\nodejs\node.EXE npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD

Browsers: Chrome: 117.0.5938.132 Firefox: 118.0 Edge: 117.0.2045.60

npmPackages: @mui/material: ^5.14.1 => 5.14.1 @mui/x-data-grid-premium: ^5.17.0 => 5.17.0 react: ^18.2.0 => 18.2.0 react-dom: ^18.2.0 => 18.2.0

Search keywords: DataGrid column menu offscreen
Order ID: 96739

@Iuli1478 Iuli1478 added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 4, 2024
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Nov 4, 2024
@michelengelen michelengelen changed the title Column Menu Positioning in MUI DataGridPremium [data grid] Column Menu Positioning in MUI DataGridPremium Nov 6, 2024
@michelengelen
Copy link
Member

Hey @Iuli1478 and thanks for opening this issue.
As stated in the LTS doc page we do not support v5 anymore and therefor cannot offer support for it.

We did notice however that the described behavior still shows in the current version, so we will add this to our board and will provide a fix for that in a future release. So in order for you to benefit from that fix (and other features from the last and coming major releases) we encourage you to upgrade your data grid version. We have a dedicated section in the docs regarding the migration process for v5 -> v6 and for v6 -> v7.

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 6, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Nov 6, 2024
@Iuli1478
Copy link
Author

Iuli1478 commented Nov 6, 2024

Hey @michelengelen, thank you for the response! Could you provide an estimated timeline for when we might expect a fix for this bug? In the meantime, is there any workaround you could suggest?

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! v5.x v6.x v7.x
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

2 participants