Skip to content

[BUG] Dropdown: programatically set value isn't persisted #1252

@MM-Lehmann

Description

@MM-Lehmann

with dash==1.12.0 (haven't tested old versions) and persistence_type='session':
setting a dcc.dropdown's value prop programatically, will update the GUI and callbacks alright, but the resulting persistence storage value (browser dev console) behaves very buggy.
some observations:

  1. When setting the value for the first time (no persisted value yet), it would not appear in the storage list at all.
    • (re)setting it manually in the GUI comes up with a scrambled list containing both the manually set value (T) and the programatically set value (null): ["T",null]
    • the issue is only to be resolved when refreshing the page, deleting the storage entry is not sufficient
  2. When having set the value in the GUI first, and then repeating the process, the value disappears with the same result
  3. the persistence entry will keep the two items list until page refresh, even when clearing the dropdown: [null,null]
  4. the programatically set values are not recalled upon page refresh
  5. this goes for both multi=True and False

Expected behaviour:
There should only be one item in the list at all times: [["T"]] or [[null]]

I can run more tests if required.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions