fix: preview table scrolling — proper flex constraints for table body scroll

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 14:12:26 +05:30
parent 64309d506b
commit 0295790c9a
2 changed files with 6 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ interface DynamicTableProps<T extends DynamicRow> {
rowClassName?: (row: T) => string;
size?: 'sm' | 'md';
maxRows?: number;
className?: string;
}
export const DynamicTable = <T extends DynamicRow>({
@@ -30,11 +31,12 @@ export const DynamicTable = <T extends DynamicRow>({
rowClassName,
size = 'sm',
maxRows,
className,
}: DynamicTableProps<T>) => {
const displayRows = maxRows ? rows.slice(0, maxRows) : rows;
return (
<Table size={size} aria-label="Dynamic table">
<Table size={size} aria-label="Dynamic table" className={className}>
<Table.Header>
{columns.map(col => (
<Table.Head key={col.id} id={col.id} label={col.headerRenderer ? '' : col.label}>