Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed columns not remaining fixed when min-width is set #27

Open
pstephenwille opened this issue Feb 19, 2019 · 2 comments
Open

Fixed columns not remaining fixed when min-width is set #27

pstephenwille opened this issue Feb 19, 2019 · 2 comments

Comments

@pstephenwille
Copy link

It's pretty easy to replicate on the sandbox demo site - https://codesandbox.io/s/jnjv6j495y.

  1. Set min-width:200px on .ReactTable .rt-th, .ReactTable .rt-td in the browsers' console.
  2. Resize the First Name column
  3. 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.

@GuillaumeJasmin
Copy link
Owner

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

@pstephenwille
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants