desktop selection
This commit is contained in:
@@ -4791,6 +4791,34 @@ const AppLayout = () => {
|
||||
],
|
||||
);
|
||||
|
||||
const handleDeskInspectDocument = useCallback(
|
||||
(docId) => {
|
||||
if (!docId) {
|
||||
return;
|
||||
}
|
||||
const rowKey = resolveDocumentRowKey(docId);
|
||||
if (rowKey) {
|
||||
applySelection([rowKey], { anchor: rowKey, interactedKeys: [rowKey] });
|
||||
}
|
||||
openDetailPanel({ documentIds: [docId] });
|
||||
},
|
||||
[applySelection, openDetailPanel],
|
||||
);
|
||||
|
||||
const handleDeskDocumentPointerSelect = useCallback(
|
||||
(docId, event) => {
|
||||
if (!docId) {
|
||||
return;
|
||||
}
|
||||
const rowKey = resolveDocumentRowKey(docId);
|
||||
if (!rowKey) {
|
||||
return;
|
||||
}
|
||||
handleRowSelection(rowKey, event);
|
||||
},
|
||||
[handleRowSelection],
|
||||
);
|
||||
|
||||
const deskWorkspaceProps = useMemo(
|
||||
() => ({
|
||||
documents,
|
||||
@@ -4802,6 +4830,10 @@ const AppLayout = () => {
|
||||
onExit: handleDeskExit,
|
||||
onRefresh: refreshCurrentFolder,
|
||||
onDocumentOpen: openDocumentPreview,
|
||||
onInspectDocument: handleDeskInspectDocument,
|
||||
onDocumentPointerSelect: handleDeskDocumentPointerSelect,
|
||||
selectedDocumentIds,
|
||||
onClearSelection: clearDocumentSelection,
|
||||
resolveThumbnailUrl: resolveThumbnailUrlForDoc,
|
||||
onAssignTagToDocument: handleDocumentTagAttach,
|
||||
onRemoveTagFromDocument: handleTagRemove,
|
||||
@@ -4819,6 +4851,10 @@ const AppLayout = () => {
|
||||
handleDeskExit,
|
||||
refreshCurrentFolder,
|
||||
openDocumentPreview,
|
||||
handleDeskInspectDocument,
|
||||
handleDeskDocumentPointerSelect,
|
||||
selectedDocumentIds,
|
||||
clearDocumentSelection,
|
||||
resolveThumbnailUrlForDoc,
|
||||
handleDocumentTagAttach,
|
||||
handleTagRemove,
|
||||
|
||||
@@ -132,8 +132,18 @@ export const useWorkspaceSurface = ({
|
||||
renderSidebarToggle,
|
||||
parentBreadcrumb,
|
||||
onNavigateParent: parentBreadcrumb ? onNavigateParent : null,
|
||||
detailProps: detailPanelProps,
|
||||
detailOpen: detailPanelOpen,
|
||||
});
|
||||
}, [viewMode, deskWorkspaceProps, renderSidebarToggle, parentBreadcrumb, onNavigateParent]);
|
||||
}, [
|
||||
viewMode,
|
||||
deskWorkspaceProps,
|
||||
renderSidebarToggle,
|
||||
parentBreadcrumb,
|
||||
onNavigateParent,
|
||||
detailPanelProps,
|
||||
detailPanelOpen,
|
||||
]);
|
||||
|
||||
const surface = useMemo(() => {
|
||||
if (showPreviewWorkspace) {
|
||||
|
||||
Reference in New Issue
Block a user