Conditional formatting not outputting

I am trying to use conditional formatting to update a table’s style for rows where certain columns have a certain value. I looked at the docs here and I also looked at this question. However when I have configured my app it still doesn’t highlight.

My callback looks like so:

    Output("scope-0-table", "data"),
    Output("scope-0-table", "style_data_conditional"),
    Input("button", "n_clicks"),
    State("bp", "value"),
def populate_tables(n_clicks, bp):
        # logic to create df_ret_zero

        return (
                'if': {
                    'filter_query': '{{my_col}} = {}'.format(bp),
                'backgroundColor': '#FF4136',
                'color': 'white'
    except Exception as e:
        print("error style")
        raise PreventUpdate

My understanding is that this should work. It should select every row that has my_col value equal to bp. Am I missing something here?

Hi @mp252,

is bp a global variable?

In your callback you have only one Input but two parameters in the function populate_tables.

No sorry, I forgot to put it in as an input, I will edit.