T
TanStack3y ago
tame-yellow

Custom width on cells

Hi everyone! Is there a way to set a custom width on my cells? I'd like to avoid wrapping this cell Thank you in advanced ❤️ I'm using V8
No description
1 Reply
tame-yellow
tame-yellowOP3y ago
I was able to set a custom sizing by using minSize on columnDefs. I bases this on this interface:
export interface ColumnSizingColumnDef {
enableResizing?: boolean;
size?: number;
minSize?: number;
maxSize?: number;
}
export interface ColumnSizingColumnDef {
enableResizing?: boolean;
size?: number;
minSize?: number;
maxSize?: number;
}
Also set this two properties on the useReactTable hook: enableColumnResizing, columnResizeMode: 'onChange', By the other hand, in my table TSX I set this mintWidth in the component
No description

Did you find this page helpful?