I am using Dash actually but havent found any way to properly set column width adapted to the content. Because when I set fill_width to False, the width fits to the datas but not to the header and on some of my columns the header is wider than the datas.
Any proper way to fix this ? Thank you in advance
NB : my code, even if I think it is not that helpful:
# Dashboard
html.Div(id="table", children=[
dash_table.DataTable(
style_header={
'backgroundColor': colors['bg_board'],
'color': colors['text_category'],
'fontWeight': 'bold'
},
style_cell={
'textAlign': 'center'
},
style_cell_conditional=[
{
'if': {'column_id': 'Maturity'},
'backgroundColor': colors['bg_board'],
'color': colors['text_category'],
}
],
style_table={
'overflowY': 'auto',
'overflowX': 'auto'
},
fixed_rows={'headers': True},
fixed_columns={'headers': True},
id='tbl'
)
]),
'data' is set in a callback but it is just a simple dataframe.