When I create a skeleton and have a child component, the skeleton takes the loading state from the child components callback and changes it visibility automatically depending on it. I want to be able to stop this if possible because I want it to depend on a callback of my choosing. I tried changing the loading_state hoping I could allow the visibility to depend upon a different components loading state but that had no affect. Below is a dummy example:
dmc.Skeleton( id='skeleton', children=[dcc.Graph(id='graph', figure=go.Figure)] ) @app.callback(Output('graph', 'figure'), Input('graph', 'relayoutData')) def update_graph(relayoutData): # Do something to update figure return go.Figure() dmc.Button(id='btn') @app.callback(Output('skeleton', 'visible'), Input('btn', 'n_clicks'), State('skeleton', 'visible')) def update_graph_vis(n, state): # Change visibility of skeleton return not state
I basically want the button to determine the visibility of the skeleton only. However, because the graph is a child of the skeleton, the skeleton will take the update_graph callback and use that to change the visibility too. So then every time I zoom in on the figure it flickers as the skeleton visibility changes… Can I stop this from happening?