Infinite callback loop introduced in Dash AG Grid

I updated from dash ag grid 2.3.0 and now I see a strange behavior:

@dash.callback(
    [ 
        Output('frr-div', 'children'),
        ....
    ],
    [
        Input('frr-table', 'selectedRows'),
        ...
    ],
    [ 
        some states...
    ],
    prevent_initial_call=True
)
def setConstraintSelection:
    do stuff...

frr-div is a container and the “children” object is a dash ag grid instance who’s id is ‘frr-table’.

On the first callback, I create a new table to go inside the ‘children’ property.

But since that creates a table, it triggers the callback again.

This time, because the selected row has changed.

But when I return the table again, it triggers the selected row callback again. And again. And again.

It seems that the issue here is that the first row of the table is now being selected by default, where before it wasn’t.

How do I work around this? Is there a way to generate a table and explicitly request that the first row NOT be selected until someone clicks on it?

Hello @zack_nc,

This is not enough code to see what is going on.

Also, 31.3 is out, not sure why you are using 2.3.

I said I upgraded from 2.3 and began seeing this behavior.

I found a workaround…