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

Expand column width to account for icons #730

Open
chriddyp opened this issue Apr 7, 2020 · 3 comments
Open

Expand column width to account for icons #730

chriddyp opened this issue Apr 7, 2020 · 3 comments
Labels
dash-type-bug Something isn't working as intended size: 2
Milestone

Comments

@chriddyp
Copy link
Member

chriddyp commented Apr 7, 2020

As reported in https://community.plotly.com/t/column-width-does-not-fit-to-text-after-making-columns-hideable/37389

By default, the column width is expanded to contain their width:
image

But then when they add hideable: True, the column names are cut off:
image

@chriddyp chriddyp added the bug label Apr 7, 2020
@tashrifbillah
Copy link

Thanks for including it in your todo, @chriddyp

@tashrifbillah
Copy link

I may have found a way around:

style_cell={'whiteSpace': 'pre-wrap'}

Including the above solved the problem:
trimming_solved

@Marc-Andre-Rivet
Copy link
Contributor

A few notes on the issue:

  • The underlying HTML Table has its own browser-implemented algorithm for assigning column width based on the widths passed to the columns. If there is limited width available vs. the desired widths, any solution we implement can still run into this issue
  • Fixing the case for fixed_rows={headers: false} should be very easy but when there are fixed rows, the fixed rows are not part of the "main" table and do not affect the row width in the same way they would if unfixed
  • A possible approach for fixed rows/columns being consistent with the unfixed table would be to do something similar to Issue 649 - Fix mismatched row height for fixed columns #722 but for columns this time

@Marc-Andre-Rivet Marc-Andre-Rivet added size: 2 dash-type-bug Something isn't working as intended and removed bug labels Apr 16, 2020
@Marc-Andre-Rivet Marc-Andre-Rivet added this to the OSS milestone Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dash-type-bug Something isn't working as intended size: 2
Projects
None yet
Development

No branches or pull requests

3 participants