-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] overflow issue when border is set to virtualScroller. #12176
Comments
@romgrk could you have a look at this please? Thanks! 🙇🏼 |
Have you tried setting the border on the top/bottom elements instead of the virtual scroller? The scroller needs precise dimensions and the border affects them. Also are you planning to migrate to v7? We're about to release it and the beta version is already available. It modifies the DOM structure substantially so if you plan to migrate, the solution for v6 would probably not work in v7. |
It means that the DOM layout has changed and the solution for v6 might not work for v7. If you're planning to stay on v6, the best suggestion I can offer is to use absolutely positioned Alternatively, you can set the border on the full grid. In that case, you could try to hide the border in the header & footer by using pseudo-elements over those two elements, but you'd need to remove the toolbar and implement the toolbar components yourself outside the grid. |
Oh thats sucks.
Thanks for the suggestion. I guess the pseudo-elements are the easiest solution for this case. |
The DOM changes improved the UX and will allow us to be much more accessible for screen readers, so we advise to look into migrating to v7 if you can. If that answers your question, you can close the issue. Feel free to reopen if you need more assistance. |
Thanks @romgrk, we will upgrade it once it's out of beta. |
How did we do @boldurean? |
Hi @romgrk just to mention that adding border to the main in v7 works as expected :) |
Steps to reproduce
Link to live example: (required) Devbox example
Steps:
Current behavior
There is a simple use case scenario where I want to separate toolbar from root (table body) as well as footer. When I set the border around the content container it looks like virtualScroller container become narrower by 2px (exact scroll amount) but virtualScrollContainer and it's children doesn't update it's width and causes overflow and ofc horizontal scroll. Adding border to practically anything from "main" class down creates overflow.
Expected behavior
Adding border to virtualScroller, virtualScrollerContainer should not cause overflow
Context
Style table body separate from root
Your environment
npx @mui/envinfo
Search keywords: DataGrid overflow, virtualScroller overflow, horizontal scroll, border overflow.
The text was updated successfully, but these errors were encountered: