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 #15121

Closed
Iuli1478 opened this issue Oct 25, 2024 · 3 comments
Closed

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

Iuli1478 opened this issue Oct 25, 2024 · 3 comments
Labels
component: data grid This is the name of the generic UI component, not the React module!

Comments

@Iuli1478
Copy link

Iuli1478 commented Oct 25, 2024

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.
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, which makes it impossible to select those menu items.
image

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 or introduce an internal scroll for the menu itself.

Context

When using the MUI DataGridPremium, I encountered a problem with the column menu positioning. If the column menu is triggered near the bottom of the viewport, it extends below the visible screen area. This causes part of the menu to be inaccessible. Additionally, if I try to scroll the page to view the hidden menu options, the menu closes automatically, making it impossible to interact with the options that are out of view.

Your environment

npx @mui/envinfo
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

@Iuli1478 Iuli1478 added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 25, 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 Oct 25, 2024
@michelengelen michelengelen changed the title Column Menu Positioning in MUI DataGridPremium [data grid] Column Menu Positioning in MUI DataGridPremium Oct 30, 2024
@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 30, 2024
@michelengelen
Copy link
Member

Hey @Iuli1478 this is the default behavior.
Could you share your implementation, since this works for me in the docs:

Screen.Recording.2024-10-30.at.10.56.46.mov

Copy link

github-actions bot commented Nov 4, 2024

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.

Note

@Iuli1478 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.

@Iuli1478
Copy link
Author

Iuli1478 commented Nov 4, 2024

Continuing the discussion here as recommended by MUI support, with the correct MUI X license key applied for premium support: #15264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

2 participants