ui
ui copied to clipboard
Data Table - Columns Definition size property has no effect
I was messing around with the Data Table component and the different column def properties and found that none of the size properties appear to have any impact on the actual column size. Not sure if it's just me experiencing this problem or if others are too.
This isn't the end of the world as I can define the size by passing an element in the cell property with a width size style but just thought I'd share this experience. Let me know if more information is needed in order to address this.
See here: https://tanstack.com/table/v8/docs/guide/column-sizing
You have to use inline styles on your column header.
style={{ width: `${header.getSize()}px` }}
Ohhh got it! Thank you @Philistino 🙏