selection cleanup
This commit is contained in:
@@ -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,
|
||||
],
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user