Skip to content

Commit

Permalink
fix: clear selection on navigation (#1541)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia authored Oct 23, 2024
1 parent 3d39e46 commit c415d66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/item/FolderContent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect } from 'react';
import { useOutletContext } from 'react-router-dom';

import { Alert, Box, Stack, Typography } from '@mui/material';
Expand Down Expand Up @@ -67,6 +68,10 @@ const Content = ({
useSelectionContext();
const DragSelection = useDragSelection({ containerId: CONTAINER_ID });

useEffect(() => {
clearSelection();
}, [clearSelection, item.id]);

if (mode === ItemLayoutMode.Map) {
return (
<Box mt={1}>
Expand Down

0 comments on commit c415d66

Please sign in to comment.