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

Column header row not resizing as expected #754

Closed
m-preiner opened this issue Jul 8, 2019 · 6 comments · Fixed by #744
Closed

Column header row not resizing as expected #754

m-preiner opened this issue Jul 8, 2019 · 6 comments · Fixed by #744
Assignees
Labels

Comments

@m-preiner
Copy link

Expected Behavior

When there are long column names, the header row height is expected to adjust to fit the entire wrapped column name.

Current Behavior

The column header cells are not resizing their height when the text begins to wrap. This causes the column headers to overlap with the first row.

Steps to Reproduce (for bugs)

I've posted a codesandbox example at :
https://codesandbox.io/embed/frosty-beaver-kcwnt.
Note: you'll probably need to open in the editor and then horizontally stretch the browser pane to put the table out of "card" mode and into "table" mode.

To reproduce

  1. Make a table with a large number of columns and fairly long columns names.
  2. Note that the column names overlap the first row...see screenshot below.

ColumnName overlap

@m-preiner
Copy link
Author

Update: It looks this issue does not occur with previous releases. For example, mui-datatables@2.0.0 does not have this problem.

@gabrielliwerant
Copy link
Collaborator

Thank you for pointing this out. I know what the issue is and will have a fix shortly.

@gabrielliwerant
Copy link
Collaborator

Should be resolved in 2.6.2.

@m-preiner
Copy link
Author

m-preiner commented Jul 10, 2019 via email

@hibc
Copy link

hibc commented Jul 11, 2019

@gabrielliwerant
Hello I just updated to v2.6.2.
I didn't encounter overlap issue, but the resizing still doesn't work when I have about 20 columns.
(Resizing works if I have about 10 columns)

When trying to resize a column, the width and height of the column stays the same, but only the column divider bar is moved.

my option is

option = {{
    onRowClick: () => { // do something},
    resizableColumns: true,
    responsive: 'scroll'
}}

@gabrielliwerant
Copy link
Collaborator

gabrielliwerant commented Jul 12, 2019

@hibc Hello. That sounds like a different issue. The one mentioned here initially has been resolved as far as I can tell.

If you like, you can open up a new ticket for your issue with steps to reproduce, and we can discuss it there. My feeling though is that you're running into limitations due to lack of remaining screen width. I don't know if that situation has been addressed as far as resizable columns yet. We'd need to determine which rows get width stolen to compensate, and there are other issues with resizable columns such as lack of minimum width which is also probably contributing.

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

Successfully merging a pull request may close this issue.

3 participants