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

Column Menu Positioning in MUI DataGridPremium #15264

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

Column Menu Positioning in MUI DataGridPremium #15264

Iuli1478 opened this issue Nov 4, 2024 · 0 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer

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
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! status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant