[Feature Request] Global set_props in backend callbacks. #2803
Closed
Description
Add a global dash.set_props
to be used in callbacks to set arbitrary props not defined in the callbacks outputs, similar to the clientside dash_clientside.set_props
.
Example:
app.layout = html.Div([
html.Div(id="output"),
html.Div(id="secondary-output"),
html.Button("click", id="clicker"),
])
@app.callback(
Output("output", "children"),
Input("clicker", "n_clicks"),
prevent_initial_call=True,
)
def on_click(n_clicks):
set_props("secondary-output", {"children": "secondary"})
return f"Clicked {n_clicks} times"
Metadata
Assignees
Labels
No labels