Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with getting state/value of a dcc element which was inputted another callback #38

Open
Ypsingh18 opened this issue Aug 12, 2021 · 0 comments

Comments

@Ypsingh18
Copy link

Ypsingh18 commented Aug 12, 2021

Hey,

I am a bit confused on how to properly chain callbacks so that I would be able to access the values of an element outside the original input callback.
Example:

serial_number_options =dcc.Dropdown(id="serial")
ecu_type_options=dcc.Dropdown(id="ecu")

@app.callback(
output=[dl.Output(serial_number_options,"options")],
args=dict(
test_station_id=dl.Input(test_id_options),
),
template=tpl
)def func():
return some list of values to store in serial_number options

@app.callback(
output=[dl.Output(ecu_type_options,"options")],
args=dict(
serial_number=dl.Input(serial_number_options),
),
template=tpl
)def func2():
read in the selected value of serial_number_options drop down
return some list of values to store in ecu_type_options

Because each time I run something like this I just get the following error:
"dash.exceptions.DuplicateIdError: Duplicate component id found in the initial layout: serial"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant