Why are previously selected options re-selected after updating the options in the select component? #544
Closed
1 of 2 tasks
Labels
bug
Something isn't working
Please provide the environment you discovered this bug in.
I'm experiencing an unexpected behavior with a multiple-select component.
After reloading the options, selecting a new option causes the previously selected options to remain selected, instead of clearing out and only selecting the new choice.
ngOnInit
, the items are bound, andfoo
isnull
.foo
becomes[1, 2]
.foo
resets to[]
as expected because the options were reloaded.[1, 2, 4]
instead of just[4]
.The expected behavior is that only option 4 is selected after reloading the options, but currently, options 1, 2, and 4 all appear selected.
Below is the minimal code to reproduce this issue:
Which area/package is the issue in?
select
Please provide the exception or error you saw
No response
Other information
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: