Skip to content

Commit

Permalink
refresh expanded rows
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Oct 29, 2024
1 parent b4ed7a1 commit 3ba3e58
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@ export const ModelsList: FC<Props> = ({
};
});
});

setItemIdToExpandedRowMap((prev) => {
// Refresh expanded rows
return Object.fromEntries(
Object.keys(prev).map((modelId) => {
const item = resultItems.find((i) => i.model_id === modelId);
return item ? [modelId, <ExpandedRow item={item as ModelItemFull} />] : [];
})
);
});
} catch (error) {
displayErrorToast(
error,
Expand Down

0 comments on commit 3ba3e58

Please sign in to comment.