add serverId to list state selection

This commit is contained in:
jeffvli
2025-09-25 21:27:49 -07:00
parent 7c50ee814d
commit 71e280061c
2 changed files with 6 additions and 1 deletions
@@ -15,6 +15,7 @@ export type ItemListAction =
export interface ItemListItem {
id: string;
itemType: LibraryItem;
serverId: string;
}
export interface ItemListState {
@@ -202,7 +202,11 @@ const itemContent = (index: number, item: any, context: ItemContext) => {
const InnerItem = memo(
({ context, index, item }: { context: ItemContext; index: number; item: ItemListItem }) => {
const handleClick = () => {
context.actions.toggleExpanded({ id: item.id, itemType: item.itemType });
context.internalState.toggleExpanded({
id: item.id,
itemType: item.itemType,
serverId: item.serverId,
});
};
return (