I am new to dash and i am trying to create a dashboard with 2 dropdown cc. The first one chooses a category and the second one based on the first one chooses subcategories.I need help on how to callback the first dropdown to affect my subcategories in the second dropdown.
Here is some sample code to get you started. Basically, you want a callback that is triggered on value of dropdown1 to returns the options and value for dropdown2. You can then have another callback handle what happens when the value for dropdown2 is changed.
Thanks for your help. Do i need to provide the options in the dcc components for the second drop down? It doesnt seem to provide any values in the second dropdown dcc?
Yes… in the update_dropdown2 function, populate the options variable as desired…what I provided was just pseudo-code to get you started, but I will edit my past post for completeness.