Hello!
May I kindly ask you to provide me with feedback on the simple topic?
When I try to fix the headers on the columns
fixed_columns= {‘headers’: True, ‘data’: 1 },
as it’s described here:
https://dash.plot.ly/datatable/sizing
The width of the table automatically shrinks to 500px.
.dash-spreadsheet.dash-freeze-left {
max-width: 500px;
}
Unfortunately, I’m not able to overwritten the value in CSS.
Any hints?
Many thanks,
Vaclav
@alexcjohnson: Alex, any clue?
hmm that’s an unfortunate hard-coded value. You should be able to override it with a more specific CSS selector - even something dumb like div.dash-spreadsheet.dash-freeze-left
should work, until we come up with a built-in way to handle it.
Long-term I’m thinking something like:
fixed_columns= {'headers': True, 'data': 1, 'style': {'maxWidth': '800px'}}
might be what we need to get the desired flexibility, where {'maxWidth': '500px'}
would simply be the default style.
@alexcjohnson
Hi Alex,
many thanks for your feedback. Your solution throws back an issue:
Invalid argument fixed_columns
passed into DataTable with ID “exch_table”.
Value provided:
{
“headers”: true,
“data”: 1,
“style”: {
“maxWidth”: “1500px”
}
}
However, the workaround that works for me at least is:
style_table={‘maxWidth’ : ‘1500px’}
Cheers,
Vaclav
right, fixed_columns.style
isn’t available now, it’s just my proposal to address the underlying issue. Anyway glad you found a solution that fixes it for your case!