Skip to content

Commit ff952e7

Browse files
fix: table generator column height
1 parent 6e1f25d commit ff952e7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/drip-table-generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drip-table-generator",
3-
"version": "3.2.2-alpha.3",
3+
"version": "3.2.2-alpha.4",
44
"description": "A visualization tool for generating schema of drip-table.",
55
"main": "dist/index.min.js",
66
"module": "lib/index.js",

packages/drip-table-generator/src/layouts/table-workstation/editable-table/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ function EditableTable<
5050
const leftHeight = leftColumnsRef.current?.getRowHeight() ?? 0;
5151
const scrollHeight = scrollColumnsRef.current?.getRowHeight() ?? 0;
5252
const rightHeight = rightColumnsRef.current?.getRowHeight() ?? 0;
53-
if (leftHeight !== scrollHeight || rightHeight !== scrollHeight || leftHeight !== rightHeight) {
53+
if ((leftHeight !== scrollHeight || rightHeight !== scrollHeight || leftHeight !== rightHeight) && (
54+
Math.abs(scrollHeight - leftHeight) > 1 && Math.abs(scrollHeight - rightHeight) > 1
55+
)) {
5456
setRowHeight(Math.max(leftHeight, scrollHeight, rightHeight));
5557
}
5658
}, [props.dataSource, props.schema, props.tableConfig]);

0 commit comments

Comments
 (0)