Skip to content

Commit

Permalink
feat: remove extra height when the table is not scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-lyl committed Feb 5, 2025
1 parent e922032 commit 8b06a27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui/src/components/Node/table/TableNodeComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ const TableNodeComponent = ({ id, data }: {
return '40px';
}
if (rows.length <= 9) {
return (rows.length + 1) * FIXED_HEIGHT + 14 + 'px';
return (rows.length + 1) * FIXED_HEIGHT + 'px';
}
// The 14px extra height is determined through testing to ensure that the table scrollbar does not obscure the height of the table body when it appears.
return 11 * FIXED_HEIGHT + 14 + 'px';
}, [showNoData, rows.length]);

Expand Down

0 comments on commit 8b06a27

Please sign in to comment.