From d867b21edb32d610d9202f0b9c75339cd667bd2a Mon Sep 17 00:00:00 2001 From: Andrew Cherniavskyi Date: Thu, 29 Feb 2024 18:50:07 +0100 Subject: [PATCH] only render scrollbars if there is scroll --- .../src/components/virtualization/GridVirtualScroller.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx b/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx index 484edc8470bb..74ff9502bf94 100644 --- a/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridVirtualScroller.tsx @@ -95,8 +95,10 @@ function GridVirtualScroller(props: GridVirtualScrollerProps) { - - + {dimensions.hasScrollY && } + {dimensions.hasScrollX && ( + + )} {props.children} );