Skip to content

Commit fa89a0c

Browse files
committed
revert box-sizing
1 parent 2219e46 commit fa89a0c

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

3+
## 1.4.2
4+
5+
_2025-04-18_
6+
7+
### Bugfix
8+
9+
- revert `box-sizing`. This was causing an infinite loop in certain dialogs. Instead we multiply border height by two to fix vertical scroll bars appearing when borders are present and maxTableHeight is specified.
10+
311
## 1.4.1
412

513
_2025-04-18_

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-fluid-table",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "A React table inspired by @tanstack/react-virtual",
55
"author": "Mckervin Ceme <mckervinc@live.com>",
66
"license": "MIT",

src/AutoSizer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const estimateTableHeight = (
3737
maxHeight > 0 ? size : Math.min(size || ESTIMATED_NUM_ROWS, ESTIMATED_NUM_ROWS) + 1;
3838
const bodyHeight = numRows * rowHeight;
3939

40-
const result = headerHeight + bodyHeight + borderHeight + footerHeight;
40+
const result = headerHeight + bodyHeight + borderHeight * 2 + footerHeight;
4141
return maxHeight > 0 ? Math.min(maxHeight, result) : result;
4242
};
4343

src/components/List.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ function BaseList<T>(
137137
// compute
138138
const headerHeight = getElemHeight(headerRef.current, heightOfHeader, HEADER_HEIGHT);
139139
const footerHeight = getElemHeight(footerRef.current, heightOfFooter, FOOTER_HEIGHT);
140-
return Math.min(headerHeight + bodyHeight! + footerHeight + borderHeight, maxTableHeight);
140+
return (
141+
Math.min(headerHeight + bodyHeight! + footerHeight + borderHeight * 2, maxTableHeight) + 2
142+
);
141143
}
142144

143145
return estimatedHeight;

src/styles/main.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
display: grid;
33
overflow: auto;
44
contain: strict;
5-
box-sizing: content-box;
65
grid-template-rows: auto 1fr auto;
76
}
87

0 commit comments

Comments
 (0)