plotly / plotly/dash

allow advanced props in `dash.callback`

Open
#2,057 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.