fix
This commit is contained in:
@@ -377,7 +377,6 @@ const useDocumentsWorkspace = ({
|
||||
navigate,
|
||||
locationPathname: location.pathname,
|
||||
isDocumentsRoute,
|
||||
selectionHelpers,
|
||||
searchIncludeDescendants,
|
||||
documentsSortField,
|
||||
documentsSortDirection,
|
||||
@@ -493,6 +492,25 @@ const useDocumentsWorkspace = ({
|
||||
return map;
|
||||
}, [documents, searchResults, previewDocuments]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!showingSearchResults) {
|
||||
return;
|
||||
}
|
||||
setSelectedEntries([]);
|
||||
setSelectionOrder([]);
|
||||
selectionOrderRef.current = [];
|
||||
selectionAnchorRef.current = null;
|
||||
setFocusedDocumentId(null);
|
||||
}, [
|
||||
showingSearchResults,
|
||||
searchQuery,
|
||||
setSelectedEntries,
|
||||
setSelectionOrder,
|
||||
selectionOrderRef,
|
||||
selectionAnchorRef,
|
||||
setFocusedDocumentId,
|
||||
]);
|
||||
|
||||
const {
|
||||
tags,
|
||||
refreshTags,
|
||||
|
||||
Reference in New Issue
Block a user