Columns resize on updated props
See original GitHub issueWhen using column resizing, the first column grows and the others shrink when data is manipulated.
I’m passing the data in as props so that may be causing the table to re-render and recalculate the widths.
Expected Behavior
When new props are passed and data is updated, the columns should not recalculate their widths.
Current Behavior
Every time an action is performed the first column appears to grow in width. This causes all others to shrink in width and is impractical to resize each column to get them to return to normal.
This happens during adding/removing rows, or editing cells. You can also import the same file over and over and watch the behavior as well.
Steps to Reproduce (for bugs)

- visit: https://klappy.github.io/tsv-editor/
- Use this file to import after removing the .txt as it only supports .tsv files. example.tsv.txt
- Click in a field to “edit”.
- “Tab” to cycle through next and previous cells to see resizing.
You can also clone the repo and after npm i and npm start you can run locally.
https://github.com/klappy/tsv-editor
Your Environment
| Tech | Version |
|---|---|
| Material-UI | ^3.9.2 |
| MUI-datatables | ^2.0.0-beta-54 |
| React | ^16.8.2 |
| browser | latest Chrome on Mac |
| etc |
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Column Resizing Feature Guide - Material React Table Docs
Material React Table lets you easily change the default widths (sizes) of columns and has a built-in column resizing draggable handle feature.
Read more >react resize fixed-data-table from nonstatic columns
The resize function resizes the width of each column based on a state change. However, I need to build the state or columns...
Read more >column-resizer - npm
It is used to set how the resize method works. Those are the possible values: 'fit' : this is default resizing model, in...
Read more >Build an Ag-Grid React Component that ... - DEV Community
This post will share an Ag-Grid wrapper component that will resize columns sizes to fit its container's width automatically.
Read more >Build an Ag-Grid React Component that Auto Resize Columns ...
If its container size changes, it will resize the columns to fit the new width. ... The component props of this component extend...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

No worries @klappy thanks for the feedback. Honestly, I have noticed this issue for a while now and I don’t have a great approach on fixing it yet. I would love for someone to pitch in on this one since I’m strapped for time
@gregnb My apologies that my first feedback is a bug. I use this frequently in my PoCs and Prototypes. This is an excellent project and I am appreciative of the amazing pace at which feature and bugs are addressed! Excellent job delivering and maintaining such a versatile component!