Skip to content

Calling clearOptions then adding new options will use old labels if values are the same #358

@naim

Description

@naim

Create a select with the following options:

[
  {value: "1", text: "red"},
  {value: "2", text: "blue"},
  {value: "3", text: "green"},
  {value: "4", text: "yellow"},
  {value: "5", text: "orange"}
]

Then, later, call clearOptions on that select. Next, using addOption, add the following options and then call refreshOptions:

[
  {value: "1", text: "square"},
  {value: "2", text: "circle"},
  {value: "3", text: "triangle"}
]

Opening the select will show "red", "blue", and "green" instead of "square", "circle", and "triangle". Selecting one of the items from the list will populate the select with "square", "circle", or "triangle" as expected, but the dropdown labels are incorrect.

This was tested using version 0.9.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions