-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use invisible header row #1758
base: dev
Are you sure you want to change the base?
Use invisible header row #1758
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It kind of works, but it's quite flickery/laggy and sometimes unresponsive when scrolling vertically or resizing the window.
data-table_screencast.mp4
I'm not sure how much work it would take, but maybe it would be worth restructuring the HTML table markup a bit (by joining the header
and the body
part to one table
) to render a semantic table and format it with CSS instead of calculating the column sizes with js.
If not, maybe it's possible to optimize the calculations a bit more.
A lower effort solution could be cloning the header row into the table body and make it visually hidden so it would essentially set the min. width of the columns - in theory. |
@akksi can you take a look at this PR again? |
Looks good to me. :) |
fixed_rows={{headers: true}} | ||
row_deletable={true} | ||
row_selectable='single' | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a test with several columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The widths of these columns changed considerably. Not sure what the "true" width should be for this case though.
|
Again not sure what the width "should" be in this case. |
The table percy tests have been flaky for some time now, unfortunately, in exactly this way: some tables just disappear entirely. If we're relying on those tests to validate the changes here, perhaps it's worth spending a little time in a separate PR just getting those tests to be reliable, then rebase this PR on top of that? |
Fixes plotly/dash-table#205 and plotly/dash-table#432