Replies: 3 comments
-
@robvk I'm trying to solve for this same thing - resize columns but maintain the table's max width. Did you come up with a suitable solution? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately not, in the end we did not allow resizing |
Beta Was this translation helpful? Give feedback.
-
The current example does slightly better, but it has a number of issues IMO. https://react-table.tanstack.com/docs/examples/full-width-resizable-table
Point 1. cannot be addressed by using flexbox, and AFAIKT flexbox is the only way to achieve a full-width re-sizable table with react-table, without writing a plugin or comparable amount of code. Point 2. and 4. just seems like a bugs. Point 3. makes is such that the example is arguably not functional. I may end up writing such a plugin, or just make some solution that works for my project but is to no benefit of react-table. I am writing this
That said, I haven't paid anything to anyone to make use of react-table, so I can only thank the developer(s) for what is available. If this does get the attention of the developer(s), and it turns out that we become reliant on react-table, I will make a honest bid to make my company becomes a supporter. cheers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My use case is as follows: I have a table component that has a number of columns, the width of this table should be fixed, but the user should be able to resize the columns. This resizing changes the widths of the columns, but the total width of the table should remain the same. The example of useFlexLayout and useColumnResizer seems to do this well, except when you make a lot of columns bigger:
https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/full-width-table
I would like this to not happen, is there a way to give a max-width to the resizer to tell it to never have the total width of the table become bigger than that? Or is there some other solution I have not thought of?
Beta Was this translation helpful? Give feedback.
All reactions