hi,
I’m not good at English.
I’m trying to set up multiple style cell conditions for the dash data table,
style_cell_conditional =[
{'if': {'column_id': c } , 'width': '80px'} for c in column_list
] + [
{'if': {'column_id' : 'System'}, 'width': '100px', 'fontWeight': 'bold'}
] + [
{'if': {'column_id' : 'Location'}, 'width': '200px', 'fontWeight': 'bold'}
] + [
{'if': {'column_id' : x , 'filter_query' : '{} eq 1'.format('{'+ x +'}')},
'backgroundColor': '#FFD6DA', 'color': 'black', 'fontWeight': 'bold'} for x in column_list[2:]
]
An error occurs in the above text.
The column list is shown below.
The column list changes from time to time.
column_list = ['System', 'Location', '14:00', '14:05', '14:10', '14:15', '14:00', '14:05,' '14:10', '14:15']
The error phrase that occurs when running is.
Failed component prop type: Invalid component prop `style_cell_conditional[12].if` key `filter_query`
supplied to DataTable.
Bad object: {
"column_id": "14:00",
"filter_query": "{14:00} eq 1"
}
Valid keys: [
"column_id",
"column_type"
]
Thank you in advance.