I think this may be related to the below post also:
I have a slave dropdown list in my application whose options change based on the value selected in a master dropdown. This part is working as expected. I would also like to add a button which, when the user selects it, causes a default value to be written to the dropdown from a callback (overriding any existing selected value). This works fine too. However, this value will not persist if I switch the master dropdown selection to another value and then back to the original selection. Persistence …
More detail on the potential problem:
I’ve had the same issue as @chander . @adamschroeder I tried running your example but it didn’t seem to fix the issue as far as I could tell?
As far as I can tell from the dash-renderer source , changes to a components props are recorded for persistence purposes when the component calls setProps. This is how components let dash-renderer know that something has changed and that it should trigger the relevant callbacks. But setProps is only called if a component changes its own props, not if it rec…
I’m not familiar with the workings of React so I’d be really happy if anyone can shed any light on whether there is a workaround for this, or if there isn’t and I should build my app with that in mind.
1 Like