Skip to content

Commit 5e73943

Browse files
fix: small fix
1 parent 18e49ca commit 5e73943

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ type CustomTableProps<RecordType> = Omit<TableProps<RecordType>, "components" |
366366
columnsStyle: TableColumnStyleType;
367367
fixedHeader: boolean;
368368
height?: number;
369+
autoHeight?: boolean;
369370
};
370371

371372
function TableCellView(props: {
@@ -539,7 +540,9 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
539540
columns={columns}
540541
scroll={{
541542
x: COL_MIN_WIDTH * columns.length,
542-
y: props.fixedHeader && props.height ? `${props.height - 100}px` : undefined,
543+
y: props.fixedHeader && props.height && !props.autoHeight
544+
? `${props.height - 100}px`
545+
: undefined,
543546
}}
544547
></Table>
545548
);
@@ -581,6 +584,7 @@ export function TableCompView(props: {
581584
() => compChildren.dynamicColumnConfig.getView(),
582585
[compChildren.dynamicColumnConfig]
583586
);
587+
const autoHeight = compChildren.autoHeight.getView();
584588
const columnsAggrData = comp.columnAggrData;
585589
const expansion = useMemo(() => compChildren.expansion.getView(), [compChildren.expansion]);
586590
const antdColumns = useMemo(
@@ -705,6 +709,7 @@ export function TableCompView(props: {
705709
size={compChildren.size.getView()}
706710
tableLayout="fixed"
707711
height={height}
712+
autoHeight={autoHeight}
708713
loading={
709714
loading ||
710715
// fixme isLoading type

0 commit comments

Comments
 (0)