diff --git a/src/App.tsx b/src/App.tsx index 2314ea4..dbe90f6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -184,7 +184,9 @@ export default function App () { { + onClick={async e => { + e.stopPropagation() + const response = await ask( `This ${ f.is_dir ? 'folder' : 'file' @@ -198,7 +200,12 @@ export default function App () { kind: 'warning' } ) - if (response) await invoke('remove_item', { path: f.path }) + if (!response) return + + await invoke('remove_item', { path: f.path }) + setFiles(prev => + prev.filter(x => !x.path.startsWith(f.path)) + ) }} />