-
-
Notifications
You must be signed in to change notification settings - Fork 73
datatable fail to expand horizontally after 4.0.0 upgrade #489
Comments
If our default behaviour changed on this matter for 4.0.0, we should also update the documentation. However, I believe that the previous 3.x default behaviour (expanding to the parent container's width) is the right behaviour here. So, we could consider this to be a bug & regression. Also, once this gets fixed, let's update this issue: https://community.plot.ly/t/how-to-make-datatable-has-width-100-after-4-0-0-upgrade/25145/4 |
Thanks for your answer. FYI, I've narrow down the issue to the [3.7.0 – 4.0.0] window. |
Confirming this is caused by the
The style difference boils down to this css:
Testing out usage scenarios and will report back here. |
Discussion notes: Need to verify if and how the default behavior has changed between 3.7.0 and 4.0.0 - reverting might be the best option. |
Cross posting a temporary fix for this for the people who end up here instead of https://community.plot.ly/t/how-to-make-datatable-has-width-100-after-4-0-0-upgrade/25145/6 adding this workaround as a css=[{"selector": "table", "rule": "width: 100%;"}], |
Problem
When upgrading Dash to
v1.0.0
and Dash table (from3.7.0
) to4.0.0
, tables stop to auto-expand horizontally. In other words, they act as "<span>
" instead of "<p>
".with dash_table 3.7.0

with dash_table 4.0.0

The issue seems to come from the
<table>
HTML element. Indeed, its<div class="cell cell-1-1 dash-fixed-content">
container expands to the full width of it's own parent. So if you manually setwidth: 100%
to the<table>
element, it works as expected.However, it would be great to do this through the source code.
But, unlike what is detailed here, the
css
attribute throws an error:and the
style_table
doesn't solve the issue:Question(s)
Is it an expected behaviour?
If so, how to make table full (container's) width again?
MWE
requirements for
dash_table
3.7.0requirements for
dash_table
4.0.0test app
The text was updated successfully, but these errors were encountered: