mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
add serverId to list state selection
This commit is contained in:
@@ -15,6 +15,7 @@ export type ItemListAction =
|
|||||||
export interface ItemListItem {
|
export interface ItemListItem {
|
||||||
id: string;
|
id: string;
|
||||||
itemType: LibraryItem;
|
itemType: LibraryItem;
|
||||||
|
serverId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ItemListState {
|
export interface ItemListState {
|
||||||
|
|||||||
@@ -202,7 +202,11 @@ const itemContent = (index: number, item: any, context: ItemContext) => {
|
|||||||
const InnerItem = memo(
|
const InnerItem = memo(
|
||||||
({ context, index, item }: { context: ItemContext; index: number; item: ItemListItem }) => {
|
({ context, index, item }: { context: ItemContext; index: number; item: ItemListItem }) => {
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
context.actions.toggleExpanded({ id: item.id, itemType: item.itemType });
|
context.internalState.toggleExpanded({
|
||||||
|
id: item.id,
|
||||||
|
itemType: item.itemType,
|
||||||
|
serverId: item.serverId,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user