How to set exact width of columns in react-table version 8 which will not change in any condition? #4707
Unanswered
yashwant-raut
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a table with an expand option while working on a react table. With react table version 7, which I used to make this table, I was able to adjust the width of each table column using the width property and the useBlockLayout hook. Now I'm switching to react-table version 8, or tan table, for performance reasons.
In version 8, I can create a table with the expand option and also set the width using the size option, but whatever size I enter is not applied exactly to columns. For example, if I enter 118 as size, it takes 120 or 110 in pixels. Additionally, if I click the expand all button and the size of the first column changes, it reduces the size of other columns.
Any width I specify in the older version appears to be applied to the table, and columns' sizes are preserved if the size of an outer contained window changes.
In conclusion, I want to give the table fixed column sizes that shouldn't alter under any circumstances.
In First implementation I have set width and that exact width is applied in version 7.
But in version 8 of table given size is not applied to column table. And my constraint is I don't want to increase the width and height of table Container Class which is holding this table
Please refer both the implementation of mine and please tell me what is I am missing in tan table implementation because of that it is not maintaining the width of column
Beta Was this translation helpful? Give feedback.
All reactions