This commit is contained in:
2025-11-06 01:54:47 +01:00
parent 82ae18b4b9
commit cedbe99513
2 changed files with 15 additions and 0 deletions
+4
View File
@@ -2770,6 +2770,8 @@ export const createDesktopSurface = ({
onBulkReanalyze,
folderOptions,
onMoveDocumentsToFolder,
searchIncludeDescendants,
onToggleSearchIncludeDescendants,
} = workspaceProps;
const title = Array.isArray(searchResults) ? 'Search results' : currentFolderName;
@@ -2786,6 +2788,8 @@ export const createDesktopSurface = ({
onViewModeChange,
onRefresh,
onShowDeskHelp: viewMode === 'desk' ? workspaceProps?.onOpenHelp : null,
includeDescendants: searchIncludeDescendants,
onToggleIncludeDescendants: onToggleSearchIncludeDescendants,
});
const floatingActions = selectionCount > 0
+11
View File
@@ -3024,6 +3024,13 @@ const AppLayout = () => {
}
if (uniqueIdSet.size) {
setSearchResults((prev) => {
if (!Array.isArray(prev) || !prev.length) {
return prev;
}
const filtered = prev.filter((doc) => doc && !uniqueIdSet.has(doc.id));
return filtered.length === prev.length ? prev : filtered;
});
setDocuments((prev) => prev.filter((doc) => !uniqueIdSet.has(doc.id)));
setFolderContents((prev) => {
if (!prev.size) {
@@ -5063,6 +5070,8 @@ const AppLayout = () => {
onBulkReanalyze: handleBulkSelectionReanalyze,
folderOptions,
onMoveDocumentsToFolder: moveDocumentsToFolder,
searchIncludeDescendants,
onToggleSearchIncludeDescendants: toggleSearchIncludeDescendants,
}),
[
documents,
@@ -5105,6 +5114,8 @@ const AppLayout = () => {
handleBulkSelectionReanalyze,
folderOptions,
moveDocumentsToFolder,
searchIncludeDescendants,
toggleSearchIncludeDescendants,
],
);