Hello Everyone! I have a multipage dash app which has the following structure:
- Charts (Folder)
Now I wanted to ask that I have a dropdown with chart options and html.Div(id=‘main-div’) in multivariate-analysis.py. The callback of this file on the basis of value selected from the dropdown updates the html.Div(id=‘main-div’) element. It is currently calling the layout function from the bar-chart.py file in Charts folder. In the bar-chart.py, there is a button to add dropdowns dynamically and a html.Div(id=‘dropdown-container’) element to show the dropdowns added in that element which is actually updating the html.Div(id=‘main-div’) in multivariate-analysis.py file. The issue I am facing is that on running the page of multivariate-analysis I am getting this error in my console:
“In the callback for output(s):
Output 0 (dynamic-dropdowns.children@8b966a484d8e6a0f52e765755da540f7) is already in use.
To resolve this, set
duplicate outputs, or combine the outputs into
one callback function, distinguishing the trigger
dash.callback_context if necessary.”
I am guessing that it is due to me calling a callback of a separate page inside callback of another page. If someone has any idea how to tackle this I will be thankful to them. And for those who might be confused as to why I am doing it like this. I wanted a folder to have pages of multiple charts each chart has its own configurations (x, y axis values) and complexity and I wanted to tackle it thru this approach. If there is a better approach feel free to correct me.