react-tabulator
react-tabulator copied to clipboard
Incorrect column width calculation when table is in a container less than 100%
bug: The last column of each row often wraps under the first column when using a container less than 100%.
Environment Details
- react-tabulator version: 18.1
Long Description
- Starting around v17.1, I noticed that the last column would wrap to under the first column in all of my tables
- I did some digging and it turns out that this happens when the table is in a container. My content is in a container (i.e.
width: 92%
). - I believe that the table is creating set widths for the column, and inserting them as inline styles. This might be miscalculating. Just a guess.
- I created a sandbox with a width set on the body and it recreated it. The issue is not there when the width is 100%. I also do not have this issue on version 0.15.0
- When you make the window bigger and smaller (i.e. resizing the browser window you can see that the column often jumps around, sometimes wrapped, sometimes in the correct spot)
[Sandbox example](https://codesandbox.io/s/react-tabulator-examples-forked-luub9?file=/src/components/styles.css)

Just throwing it out there that I'm experiencing the same thing. Some assorted info in case it's useful:
- This could either be an issue with the underlying
tabulator-tables
dependency orreact-tabulator
itself. I'm not sure at this point, but I suspect it's the former. - It looks like there have been a number of updates/fixes for
tabulator-tables
since the5.0.10
version thatreact-tabulator
currently uses. I tried an experiment locally where I replacedtabulator-tables
with the most recent version (5.1.2
), but the issue appears to still happen.
@ngduc Just wanted to see if there's any update on this issue. Thanks!
@paintedbicycle Any luck with a workaround or fix on your end?