diff --git a/packages/frontend/core/src/components/explorer/display-menu/properties.tsx b/packages/frontend/core/src/components/explorer/display-menu/properties.tsx index 26f6c0c53f..f4b307518f 100644 --- a/packages/frontend/core/src/components/explorer/display-menu/properties.tsx +++ b/packages/frontend/core/src/components/explorer/display-menu/properties.tsx @@ -5,6 +5,7 @@ import { useLiveData, useService } from '@toeverything/infra'; import { useCallback, useMemo } from 'react'; import { WorkspacePropertyName } from '../../properties'; +import { WorkspacePropertyTypes } from '../../workspace-property-types'; import { generateExplorerPropertyList } from '../properties'; import type { ExplorerDisplayPreference } from '../types'; import * as styles from './properties.css'; @@ -147,7 +148,12 @@ const PropertyRenderer = ({ : null; const isActive = activeKey && displayProperties.includes(activeKey); - if (!key) { + const showInDocList = + systemProperty?.showInDocList || + (workspaceProperty && + WorkspacePropertyTypes[workspaceProperty.type]?.showInDocList); + + if (!key || !showInDocList) { return null; } return ( diff --git a/packages/frontend/core/src/components/explorer/docs-view/properties.tsx b/packages/frontend/core/src/components/explorer/docs-view/properties.tsx index accf706f7f..5dc06a17c0 100644 --- a/packages/frontend/core/src/components/explorer/docs-view/properties.tsx +++ b/packages/frontend/core/src/components/explorer/docs-view/properties.tsx @@ -113,7 +113,7 @@ export const ListViewProperties = ({ docId }: { docId: string }) => { if (!displayKey || !displayProperties?.includes(displayKey)) { return null; } - if (systemProperty) { + if (systemProperty && systemProperty.showInDocList) { return ( { key={systemProperty.type} /> ); - } else if (workspaceProperty) { + } else if ( + workspaceProperty && + WorkspacePropertyTypes[workspaceProperty.type]?.showInDocList + ) { return (