Columns resizing not working in 6.9.2
See original GitHub issueUsing v6?
v6 is now considered feature complete to its current abilities and limitations. We are not actively working to fix any issues for v6 any more. We will, however, merge any non-breaking pull requests submitted to fix anything in v6.
Using v7?
Thanks for using the alpha version of React Table v7! We’re very excited about it.
Describe the bug A clear and concise description of what the bug is.
I just upgraded from 6.8.6 to 6.9.2 four days ago. Yesterday I noticed that my column resizing wasn’t working. Further debugging showed these values in onResizedEvent { resized: { value: NaN}}
. I reverted back to 6.8.6, and it worked again.
To Reproduce Steps to reproduce the behavior:
- using 6.9.2, resize a column
- review values of
onResizedEvent
, as described above.
Expected behavior columns to resize correctly
Codesandbox! Use a new react-table codesandbox to reproduce the issue.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] Linux
- Browser [e.g. chrome, safari] chrome
- Version [e.g. 22] Version 72.0.3626.119
Smartphone (please complete the following information): N/A
Additional context N/A
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:14
Hi Guys! I needed this version to work since there is a bug in 6.8.6 which doesn’t let me use pivotBy at the same time as a column is editable. So downgrading was not an option for me.
What I can see the reason for this behavior is that minResizeWidth is undefined when passed to a Math.max() which returns NaN.
So a workaround that works for me is to set minResizeWidth to a value for each column I need to resize.
Example: const columns = [ { id:“name”, Header: “Name”, accessor: “Name”, minResizeWidth: 150, }, { id:“email”, Header: “Email”, accessor: “Email”, minResizeWidth: 1, }, ];
@dbertella How funny it is… I just fixed by doing the same thing like a min ago! The problem for us was that we had
^6.8.6
and by removing ^ to6.8.6
solved the problem!