Skip to content

Commit f82e426

Browse files
authored
fix: the height of the subtable in the form is set along with the mai… (nocobase#6518)
* fix: the height of the subtable in the form is set along with the main form height * fix: bug
1 parent a2002d8 commit f82e426

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

packages/core/client/src/schema-component/antd/association-field/Table.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -602,12 +602,6 @@ const InternalNocoBaseTable = React.memo(
602602
height: 100%;
603603
display: flex;
604604
flex-direction: column;
605-
.ant-table-expanded-row-fixed {
606-
min-height: ${tableHeight}px;
607-
}
608-
.ant-table-body {
609-
min-height: ${tableHeight}px;
610-
}
611605
.ant-table-cell {
612606
padding: 16px 8px;
613607
}

packages/core/client/src/schema-component/hooks/useBlockSize.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ const getPageHeaderHeight = (disablePageHeader, enablePageTabs, hidePageTitle, t
3737
token.paddingContentHorizontalLG
3838
);
3939
}
40-
return token.controlHeight + token.marginXS + (token.paddingXXS + 2) * 2 + token.paddingContentHorizontalLG;
40+
return (
41+
token.controlHeight + token.marginXS + (token.paddingContentVertical + 2) * 2 + token.paddingContentHorizontalLG
42+
);
4143
} else {
4244
if (enablePageTabs) {
4345
return (
@@ -140,12 +142,12 @@ export const useDataBlockHeight = (options?: UseDataBlockHeightOptions) => {
140142
const { heightMode, height, title, titleHeight } = heightProps || {};
141143

142144
const blockHeaderHeight = title ? titleHeight : 0;
145+
143146
if (!heightProps?.heightMode || heightMode === HeightMode.DEFAULT) {
144147
return;
145148
}
146149
if (heightMode === HeightMode.FULL_HEIGHT) {
147150
let res = window.innerHeight - pageFullScreenHeight;
148-
console.log(res);
149151
if (options?.removeBlockHeaderHeight) {
150152
res = res - blockHeaderHeight;
151153
}

0 commit comments

Comments
 (0)