Black Lives Matter. Please consider donating to Black Girls Code today.

Issue with datatable conditional formatting

I cannot seem to get the conditional formatting to work right. Everything else works wonderfully, just not the conditional formatting using “eq”. Here is my table, which displays all properties appropriately:
html.Div(
dash_table.DataTable(
id=‘datatable-interactivity_2’,
editable=False,
filtering=False,
sorting=True,
sorting_type=“multi”,
row_selectable=“multi”,
row_deletable=False,
selected_rows=[],
n_fixed_rows=1,
virtualization=True,
style_data_conditional=[{}],
style_table={
‘maxHeight’:‘600’,
‘overflowY’: ‘scroll’,
‘overflowX’: ‘scroll’
},
),style={‘width’: ‘80%’, ‘display’: ‘inline-block’})

And here is the callback

@app.callback(
Output(‘datatable-interactivity_2’, ‘style_data_conditional’),
[Input(‘update’, ‘n_clicks’)])
def update_table_highlights():
condition1 = [{‘if’: {‘column_id’: ‘Item-type’, ‘filter’: ‘Item-type eq “text”’}, ‘backgroundColor’: ‘#3D9970’, ‘color’: ‘white’}]
return condition1