Skip to content

Commit

Permalink
fix: Dynamic table heights (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-almonacid authored Dec 19, 2023
1 parent 217a663 commit 9e70ca4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ const CustomTableModule: FC<ICustomTableProps> = ({
(partialSum, child) => partialSum + child.clientHeight,
0
) + HEADER_HEIGHT;
setWidgetHeight(Math.min(height, DEFAULT_WIDGET_HEIGHT));
// there seems to be a weird case where the scrollRef is valid,
// but the height of the items is 0, so we end up with
// height = HEADER_HEIGHT;
if (height > HEADER_HEIGHT) {
setWidgetHeight(Math.min(height, DEFAULT_WIDGET_HEIGHT));
}
}
prevScrollRef.current = scrollRef;
}
Expand Down

0 comments on commit 9e70ca4

Please sign in to comment.