cleanup
This commit is contained in:
@@ -14,7 +14,7 @@ interface WorkspaceSelectionOptions {
|
||||
isDocumentRowKey?: (key: RowKey | SelectionEntry) => boolean;
|
||||
isFolderRowKey?: (key: RowKey | SelectionEntry) => boolean;
|
||||
getRowId?: (key: RowKey | SelectionEntry) => string | number | null;
|
||||
onInspectDocument?: (id: string | number) => void;
|
||||
onDocumentActivate?: (id: string | number) => void;
|
||||
onInspectFolder?: (id: string | number) => void;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useWorkspaceSelection = ({
|
||||
isDocumentRowKey = () => false,
|
||||
isFolderRowKey = () => false,
|
||||
getRowId = () => null,
|
||||
onInspectDocument = identity,
|
||||
onDocumentActivate = identity,
|
||||
onInspectFolder = identity,
|
||||
}: WorkspaceSelectionOptions = {}) => {
|
||||
const selection = useDocumentSelection({
|
||||
@@ -88,9 +88,9 @@ export const useWorkspaceSelection = ({
|
||||
const inspectDocument = useCallback(
|
||||
(documentId?: string | number | null) => {
|
||||
if (!documentId) return;
|
||||
onInspectDocument(documentId);
|
||||
onDocumentActivate(documentId);
|
||||
},
|
||||
[onInspectDocument],
|
||||
[onDocumentActivate],
|
||||
);
|
||||
|
||||
const inspectFolder = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user