Skip to content

Commit 10fd6d9

Browse files
committed
try and calculate border height
1 parent b1bba49 commit 10fd6d9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/AutoSizer.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ const estimateTableHeight = (
2323
const headerHeight = getElemHeight(header, estimatedHeader, HEADER_HEIGHT);
2424

2525
// find footer height
26-
let footerHeight = 0;
27-
if (hasFooter) {
28-
footerHeight = getElemHeight(findFooterByUuid(uuid), estimatedFooter, FOOTER_HEIGHT);
29-
}
26+
const footerHeight = hasFooter
27+
? getElemHeight(findFooterByUuid(uuid), estimatedFooter, FOOTER_HEIGHT)
28+
: 0;
3029

3130
// calculate border height
32-
const table = header?.parentElement?.parentElement;
31+
const table = header?.parentElement;
3332
const borderHeight = table ? table.offsetHeight - table.clientHeight : 0;
3433

3534
// for the rows, calculate the height of all the rows

0 commit comments

Comments
 (0)