dbc.Collapse contents update only once on first callback trigger

I have the following collapse:


Where the children of the Div are populated by a callback like this one:

    [Output('table_1', 'children')],
    [Input('button', 'n_clicks')]
def generate_table(n_clicks):
    return dash_table.DataTable()

The observed behaviour is that on the first trigger of the callback the table is populated accordingly. However, from the second trigger onwards, although the callback returns a different table, the Div in the collapse remains with the initially populated table.

Does anybody know what am I doing wrong or perhaps it is a dbc.Collapse bug?

Hi @KonstantinV

I can’t see anything wrong with what you posted. Could you make a minimal working example that reproduces the problem?