File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,13 @@ export const SponsoredFeedsTable = ({
38
38
// Calculate table height based on number of items
39
39
// Each row is approximately 40px (py-2 = 8px top + 8px bottom + content height)
40
40
// Header is approximately 48px (py-2 = 8px top + 8px bottom + font height)
41
- // Show 7 rows by default, then scroll
41
+ // Show 7 rows by default, then scroll - but maintain consistent minimum height
42
42
const maxVisibleRows = 7 ;
43
43
const shouldScroll = feeds . length > maxVisibleRows ;
44
- const tableHeight = shouldScroll ? `${ 48 + maxVisibleRows * 40 } px` : "auto" ;
44
+ const rowHeight = 56 ; // Increased row height to account for actual content height
45
+ const headerHeight = 48 ; // Header height in pixels
46
+ const exactTableHeight = `${ headerHeight + maxVisibleRows * rowHeight } px` ; // Exact height for 7 rows
47
+ const tableHeight = shouldScroll ? exactTableHeight : "auto" ; // Use exact height for scrollable tables
45
48
46
49
return (
47
50
< div className = "my-6" >
You can’t perform that action at this time.
0 commit comments