I am currently configuring a Dash DataTable. In regard to style_cell_conditional for column alignment, I know that it can be done in the following way:
style_cell_conditional=[
{
'if': {'column_id': 'food'},
'textAlign': 'left'
}
]
OR for multiple columns:
style_cell_conditional=[
{
'if': {'column_id': c},
'textAlign': 'left'
} for c in ['Date', 'Region']
]
My question is: Is it possible to have an âelseâ statement in order to format the remaining columns?
For example:
style_cell_conditional=[
{
'if': {'column_id': 'weapon'},
'textAlign': 'left'
'else',
'textAlign': 'center'
}
]