mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
add serverId to list state selection
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user