Skip to content

Commit 2b5e1af

Browse files
fix: table height sync
1 parent 5eb812e commit 2b5e1af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-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.7",
3+
"version": "3.2.2-alpha.8",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function EditableTable<
104104
}
105105
} else {
106106
const [lastLeftHeight, lastScrollHeight, lastRightHeight] = lastRowHeights.current ?? [];
107-
if (lastLeftHeight !== leftCellHeight || lastScrollHeight !== scrollCellHeight || lastRightHeight !== rightCellHeight) {
107+
if (lastLeftHeight !== leftCellHeight || Math.abs(lastScrollHeight - scrollCellHeight) > 1 || lastRightHeight !== rightCellHeight) {
108108
setRowHeight(Math.max(leftCellHeight, scrollCellHeight, rightCellHeight) + 1);
109109
lastRowHeights.current = [leftCellHeight, scrollCellHeight, rightCellHeight];
110110
}

0 commit comments

Comments
 (0)