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