diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx index a06ba65b6d..4a84f33c6d 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx @@ -714,9 +714,9 @@ export const Table: any = withDynamicSchemaProps( const scroll = useMemo(() => { return { x: 'max-content', - y: tableHeight, + y: dataSource.length > 0 ? tableHeight : undefined, }; - }, [tableHeight, maxContent]); + }, [tableHeight, maxContent, dataSource]); const rowClassName = useCallback( (record) => (selectedRow.includes(record[rowKey]) ? highlightRow : ''), @@ -754,6 +754,9 @@ export const Table: any = withDynamicSchemaProps( height: 100%; display: flex; flex-direction: column; + .ant-table-expanded-row-fixed { + min-height: ${tableHeight}px; + } .ant-table-body { min-height: ${tableHeight}px; }