Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

fix: clear selection on navigation #1541

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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