reimplement playqueue list controls

This commit is contained in:
jeffvli
2025-11-13 18:48:46 -08:00
parent 498abf3c3d
commit 744780861f
6 changed files with 51 additions and 103 deletions
@@ -1,12 +1,13 @@
import { useRef, useState } from 'react';
import { ItemListHandle } from '/@/renderer/components/item-list/types';
import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queue';
import { PlayQueueListControls } from '/@/renderer/features/now-playing/components/play-queue-list-controls';
import { Stack } from '/@/shared/components/stack/stack';
import { ItemListKey } from '/@/shared/types/types';
export const SidebarPlayQueue = () => {
const tableRef = useRef<null>(null);
const tableRef = useRef<ItemListHandle | null>(null);
const [search, setSearch] = useState<string | undefined>(undefined);
return (
@@ -17,7 +18,7 @@ export const SidebarPlayQueue = () => {
tableRef={tableRef}
type={ItemListKey.SIDE_QUEUE}
/>
<PlayQueue listKey={ItemListKey.SIDE_QUEUE} searchTerm={search} />
<PlayQueue listKey={ItemListKey.SIDE_QUEUE} ref={tableRef} searchTerm={search} />
</Stack>
);
};