From f82e426daa201892cf63ef8e0affd70cf18debf3 Mon Sep 17 00:00:00 2001 From: Katherine Date: Thu, 20 Mar 2025 23:17:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20the=20height=20of=20the=20subtable=20in?= =?UTF-8?q?=20the=20form=20is=20set=20along=20with=20the=20mai=E2=80=A6=20?= =?UTF-8?q?(#6518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: the height of the subtable in the form is set along with the main form height * fix: bug --- .../src/schema-component/antd/association-field/Table.tsx | 6 ------ .../core/client/src/schema-component/hooks/useBlockSize.ts | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/association-field/Table.tsx b/packages/core/client/src/schema-component/antd/association-field/Table.tsx index 851e223b8d..bf3607976a 100644 --- a/packages/core/client/src/schema-component/antd/association-field/Table.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/Table.tsx @@ -602,12 +602,6 @@ const InternalNocoBaseTable = React.memo( height: 100%; display: flex; flex-direction: column; - .ant-table-expanded-row-fixed { - min-height: ${tableHeight}px; - } - .ant-table-body { - min-height: ${tableHeight}px; - } .ant-table-cell { padding: 16px 8px; } diff --git a/packages/core/client/src/schema-component/hooks/useBlockSize.ts b/packages/core/client/src/schema-component/hooks/useBlockSize.ts index 8272e448d2..826b891400 100644 --- a/packages/core/client/src/schema-component/hooks/useBlockSize.ts +++ b/packages/core/client/src/schema-component/hooks/useBlockSize.ts @@ -37,7 +37,9 @@ const getPageHeaderHeight = (disablePageHeader, enablePageTabs, hidePageTitle, t token.paddingContentHorizontalLG ); } - return token.controlHeight + token.marginXS + (token.paddingXXS + 2) * 2 + token.paddingContentHorizontalLG; + return ( + token.controlHeight + token.marginXS + (token.paddingContentVertical + 2) * 2 + token.paddingContentHorizontalLG + ); } else { if (enablePageTabs) { return ( @@ -140,12 +142,12 @@ export const useDataBlockHeight = (options?: UseDataBlockHeightOptions) => { const { heightMode, height, title, titleHeight } = heightProps || {}; const blockHeaderHeight = title ? titleHeight : 0; + if (!heightProps?.heightMode || heightMode === HeightMode.DEFAULT) { return; } if (heightMode === HeightMode.FULL_HEIGHT) { let res = window.innerHeight - pageFullScreenHeight; - console.log(res); if (options?.removeBlockHeaderHeight) { res = res - blockHeaderHeight; }