Describe the bug
I used one of your examples and added a defaultColumn with an initial size to the table, which works fine. However if the defaultColumn gets updated later on, this change doesn't get reflected in the actual size of the table columns.
So if we have the below code and I set the initial size to 100 and then in the useEffect I update it to 50, it will still remain 100 for the rendered table even if the table generated by the useReactTable gets the new value. I checked the same with columnResizeDirection and it works fine.
const [defaultColumn, setDefaultColumn] = React.useState({size: 200})
React.useEffect(() => {
setDefaultColumn({size: 50})
}, [])
const table = useReactTable({
data,
columns,
columnResizeMode,
defaultColumn,
columnResizeDirection,
getCoreRowModel: getCoreRowModel(),
debugTable: true,
debugHeaders: true,
debugColumns: true,
})
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/reacttable-lycjfh
Steps to reproduce
As in description
Expected behavior
The size of the columns gets updated when the defaultColumn gets changed
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
macOS Chrome
react-table version
8.11.6
TypeScript version
4.4.2
Additional context
No response
Terms & Code of Conduct
Describe the bug
I used one of your examples and added a defaultColumn with an initial size to the table, which works fine. However if the defaultColumn gets updated later on, this change doesn't get reflected in the actual size of the table columns.
So if we have the below code and I set the initial size to 100 and then in the useEffect I update it to 50, it will still remain 100 for the rendered table even if the table generated by the useReactTable gets the new value. I checked the same with columnResizeDirection and it works fine.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/reacttable-lycjfh
Steps to reproduce
As in description
Expected behavior
The size of the columns gets updated when the defaultColumn gets changed
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
macOS Chrome
react-table version
8.11.6
TypeScript version
4.4.2
Additional context
No response
Terms & Code of Conduct