allow advanced props in `dash.callback`
Open
Nobody has claimed this yet.
feature
P3
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names dash.callback and Input as the entry points, but does not identify files or tests. Start by tracing how Input props are handled; done would mean supporting the requested list or dictionary prop structures and passing the corresponding values to the callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100