⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@BSd3v
Copy link
Contributor

@BSd3v BSd3v commented Jan 12, 2026

fixes #3330

fixes issue where components wouldnt remount when passed as a children prop
eg:

import dash_mantine_components as dmc
from dash import Dash, Input, Output, State, no_update, html
from dash_ag_grid import AgGrid
app = Dash()

test = [
    AgGrid(
        id="ag-grid",
        rowData=[
            {"number": 1, "text": "a"},
        ],
        columnDefs=[
            {"field": "number", "filter": "agNumberColumnFilter"},
            {"field": "text", "filter": "agTextColumnFilter"},
        ]
    )
]

app.layout = dmc.MantineProvider(
    [
        html.Div(
            test,
        id='data-entry'
        ),
        dmc.Button('reload layout', id='reload-btn'),
    ],
    id="mantine-provider",
    defaultColorScheme="auto",
)

@app.callback(
    Output('data-entry', 'children'),
    Input('reload-btn', 'n_clicks'),
)
def reload_data(n_clicks):
    if n_clicks:
        return test
    return no_update

if __name__ == "__main__":
    app.run(debug=True)

Running this in the current dash will result in the component keeping some state even though it should technically be unmounted and remounted.

@AnnMarieW
Copy link
Collaborator

I tried this and confirmed that it fixes the example app from #3497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disappearing and Swapping Content in Dash v3

2 participants