Skip to content

Commit c8376ef

Browse files
committed
BED-5576: Remove top margin for FixedSizeList to prevent overflow
1 parent 6a9298d commit c8376ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const normalizeItem = (item: VirtualizedNodeListItem): VirtualizedNodeListItem =
3838
});
3939

4040
const InnerElement = ({ style, ...rest }: any) => (
41-
<List component='ul' disablePadding style={{ ...style, overflowX: 'hidden' }} {...rest} />
41+
// Top margin is adjusted to account for FixedSizeList's default of 'overflow: auto'
42+
// causing the scrollbar to render even for a single node
43+
<List component='ul' disablePadding style={{ ...style, overflowX: 'hidden', marginTop: 0 }} {...rest} />
4244
);
4345

4446
const Row = ({ data, index, style }: ListChildComponentProps<VirtualizedNodeListItem[]>) => {

0 commit comments

Comments
 (0)