[Feature Request] Advanced props in `dash.callback`
I vaguely remember that Chris might have mentioned this before (if so please link issue), but it would be nice if in dash.callback(id, props) we can use some advanced structure for props. E.g.
@dash.callback(Output(...), Input(my_component.id, ["children", "id"]))
def func(lst):
print(lst[0]) # => the content of children
print(lst[1]) # => the ID
Or a dictionary could also work:
@dash.callback(Output(...), Input(my_component.id, {"foo": "children", "bar": "id"}))
def func(di):
print(di['foo']) # => the content of children
print(di['bar']) # => the ID
Oh interesting, these input structures are already possible via flexible callback signatures but for the specific case of multiple props of the same component these are nice shorthands, and seem quite intuitive to me. Just like flexible callbacks, seems like this applies to outputs as well.
I think it's especially useful when combined with pattern matching callback, which tend to be rather long to write. This could avoid repetition.