From 4dd969d05f3a2dba5b00535edb2a7d4e878295e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20de=20la=20Martini=C3=A8re?= Date: Thu, 26 Feb 2026 15:28:08 +0100 Subject: [PATCH] maybe fix it, need to check regressions on windows/linux --- src/components/TrackListDefault.module.css | 12 +++ src/components/TrackListDefault.tsx | 89 +++++++++++----------- src/elements/Scrollable.tsx | 7 +- 3 files changed, 64 insertions(+), 44 deletions(-) diff --git a/src/components/TrackListDefault.module.css b/src/components/TrackListDefault.module.css index d6adc99ef..822e8953f 100644 --- a/src/components/TrackListDefault.module.css +++ b/src/components/TrackListDefault.module.css @@ -1,3 +1,15 @@ +.root { + display: flex; + flex-direction: column; + flex: 1 1 auto; + min-height: 0; +} + +.scrollArea { + flex: 1 1 auto; + min-height: 0; +} + .rows { width: 100%; position: relative; diff --git a/src/components/TrackListDefault.tsx b/src/components/TrackListDefault.tsx index d4e7b8927..538fff126 100644 --- a/src/components/TrackListDefault.tsx +++ b/src/components/TrackListDefault.tsx @@ -112,52 +112,55 @@ export default function TrackListDefault(props: Props) { modifiers={DND_MODIFIERS} sensors={sensors} > - +
- {/* The large inner element to hold all of the items */} -
    - + + {/* The large inner element to hold all of the items */} +
      - {/* Only the visible items in the virtualizer, manually positioned to be in view */} - {virtualizer.getVirtualItems().map((virtualItem) => { - const track = tracks[virtualItem.index]; - return ( - - ); - })} - -
    - + + {/* Only the visible items in the virtualizer, manually positioned to be in view */} + {virtualizer.getVirtualItems().map((virtualItem) => { + const track = tracks[virtualItem.index]; + return ( + + ); + })} + +
+ +
); } diff --git a/src/elements/Scrollable.tsx b/src/elements/Scrollable.tsx index 7e015ab27..64146a7c0 100644 --- a/src/elements/Scrollable.tsx +++ b/src/elements/Scrollable.tsx @@ -3,11 +3,16 @@ import styles from './Scrollable.module.css'; type Props = { children: React.ReactNode; ref: React.Ref; + className?: string; }; export default function Scrollable(props: Props) { + const className = props.className + ? `${styles.scrollable} ${props.className}` + : styles.scrollable; + return ( -
+
{props.children}
);