feat: ability to cancel multiple selection from UI (#1045)

This commit is contained in:
Mo
2022-05-23 17:01:44 -05:00
committed by GitHub
parent acdf442e61
commit 8877c42079
9 changed files with 74 additions and 22 deletions

View File

@@ -27,7 +27,7 @@ export const FileContextMenu: FunctionComponent<Props> = observer(({ appState })
const [closeOnBlur] = useCloseOnBlur(contextMenuRef, (open: boolean) => setShowFileContextMenu(open))
useCloseOnClickOutside(contextMenuRef, () => appState.files.setShowFileContextMenu(false))
const selectedFile = Object.values(selectedFiles)[0]
const selectedFile = selectedFiles[0]
if (!showFileContextMenu || !selectedFile) {
return null
}