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}
);