Skip to content

Commit

Permalink
ui: reset selection data for the data page if switching collections
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid committed Jul 25, 2024
1 parent c53800d commit 3c6ec66
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ const CollectionData = (props: CollectionDataProps) => {
}
}, []);

useEffect(() => {
// reset selection
setSelectedData([]);
}, [collection.collection_name]);

return (
<div className={classes.root}>
{collection && (
Expand Down

0 comments on commit 3c6ec66

Please sign in to comment.