This commit is contained in:
2025-10-28 01:38:19 +01:00
parent 7df9a6415a
commit 1e177580c9
6 changed files with 211 additions and 82 deletions
+14 -1
View File
@@ -1,6 +1,7 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { getAssetFromVersion, resolveDocumentAssetUrl, createAssetView } from '../asset_manager';
import { getTagColorStyle } from '../utils/colors';
import DetailPanel from '../detail/DetailPanel';
import {
DownloadIcon,
EditIcon,
@@ -1125,6 +1126,7 @@ export const createDocumentsSurface = ({
parentBreadcrumb,
onNavigateParent,
renderSidebarToggle,
detailProps,
}) => {
const {
currentFolderName,
@@ -1174,11 +1176,22 @@ export const createDocumentsSurface = ({
)
: null;
const detail = (() => {
if (!detailProps) {
return null;
}
const count = detailProps.selectedDocuments?.length || 0;
if (!count) {
return null;
}
return <DetailPanel {...detailProps} />;
})();
return {
key: 'documents',
variant: 'documents',
header: { title, subtitle, leading, actions },
content: <DocumentsTable {...tableProps} showHeader={false} />,
supportsDetail: true,
detail,
};
};