Skip to content

handle multiple Outputs in app.callback #149

Closed
@sdementen

Description

@sdementen

It would be nice to have the ability to update multiple outputs at once by specifying a list of Outputs and returning a tuple with the same number of outputs like in

@app.callback(
     [Output('label1', 'children'),
      Output('label2', 'children'),
     ],
     [Input('dropdown', 'value'),
      ])
 def cb_test_multi(value):
     # some very complex calculation to be triggered only once when 'dropdown' changes
     ...
     # result of calculation need to be pushed partly on 'label1' and partly on 'label2'
     return "Hello", value

This would allow simplifying otherwise complex flow to update multiple components based on one change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions