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
@@ -564,15 +564,6 @@ export const ItemGridList = ({
const imperativeHandle: ItemListHandle = useMemo(() => {
return {
clearExpanded: () => {
internalState.clearExpanded();
},
clearSelected: () => {
internalState.clearSelected();
},
getItem: (index: number) => data[index],
getItemCount: () => data.length,
getItems: () => data,
internalState,
scrollToIndex: (index: number) => {
scrollToIndex(index);
@@ -581,7 +572,7 @@ export const ItemGridList = ({
scrollToOffset(offset);
},
};
}, [data, internalState, scrollToIndex, scrollToOffset]);
}, [internalState, scrollToIndex, scrollToOffset]);
useEffect(() => {
handleRef.current = imperativeHandle;