Column widths based on rem #5460
Unanswered
PrettyCoffee
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey @PrettyCoffee, just stumbled on this discussion. Did you find some workaround, I'm at exactly the same place 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! :)
I am currently working on building a Table component on top of react-table and have been running into an issue with the column sizing.
The column sizing documentation mentions at one point:
So I was assuming that there shouldn't be a problem to base everything in the table off
rem
values. This has been working pretty well with some adjustments, until working with column resizing. I can't get column resizing to work withrem
units, no matter what I try.I have checked out the column sizing state documentation and have been playing around with the
onColumnSizingChange
andonColumnSizingInfoChange
handlers.It seems like you can properly adjust the stored column sizes. However, the resizing handler internally uses pixel values which then result in an offset / initial jumping when dragging the resize handle. related table-core code
See this reproduction for what I am trying to achieve.
Now my questions are:
If this is not possible and will never be, I think it would be nice to have a comment on that in the documentation as well, something like
However, using different css units is not supported by the built-in resizing feature
.PS: I love this library and am having a blast using it, keep up that great work! 🔥
Beta Was this translation helpful? Give feedback.
All reactions