selection cleanup

This commit is contained in:
2025-11-19 00:57:06 +01:00
parent 1764f24243
commit 6923a68837
5 changed files with 39 additions and 20 deletions
@@ -1,4 +1,5 @@
import { useMemo } from 'react';
import type { WorkspaceSelectionValue } from '../../app/WorkspaceSelectionContext';
type Identifier = string | number;
@@ -72,6 +73,7 @@ export interface UseDocumentsPanelPropsArgs {
moveDocumentsToFolder?: (...args: unknown[]) => void;
documentLinks?: Map<Identifier, DocumentLinkLike>;
ensureDownloadUrl?: (documentId: Identifier, options?: { force?: boolean }) => Promise<DocumentLinkLike | null>;
selectionValue: WorkspaceSelectionValue;
}
export type DocumentsPanelProps = ReturnType<typeof useDocumentsPanelProps>;
@@ -128,6 +130,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
moveDocumentsToFolder,
documentLinks,
ensureDownloadUrl,
selectionValue,
} = props;
return useMemo(
@@ -184,6 +187,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
onMoveDocumentsToFolder: moveDocumentsToFolder,
documentLinks,
ensureDownloadUrl,
selectionValue,
}),
[
activeCorrespondentFilters,
@@ -236,6 +240,7 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => {
folderOptions,
documentLinks,
ensureDownloadUrl,
selectionValue,
],
);
};