Fixed columns not remaining fixed when min-width is set
Opened this issue · 2 comments
It's pretty easy to replicate on the sandbox demo site - https://codesandbox.io/s/jnjv6j495y.
- Set
min-width:200px
on.ReactTable .rt-th, .ReactTable .rt-td
in the browsers' console. - Resize the First Name column
- Move the horizontal scrollbar and see the Last Name column move and cover up the First Name column.
I don't think that's expected but let me know if it is, and how to keep get both First and Last name columns to remain fixed with min-widths.
Hi,
Thanks for your feedback.
min width and max width are hard to implement with fixed columns, because Last Name use the First Name width to be placed with the correct offset, but Last Name can’t currently know the width of First Name if there is only min-width.
I will investigate in few days and try to get width from DOM elements instead of use internal react-table column width (which is the current behavior).
To temporary fix this issue, do not use min-width, but set width of each column from columns props
Understood, and thanks for the quick reply. I'll check back in a few days. Just so you know, our need is to constrain min and max-width while resizing.