-
Notifications
You must be signed in to change notification settings - Fork 1.8k
removeSelected
removes any pre-selected item from dropdown
#1672
Comments
It's worth noting that this situation works fine with 0.17.1. A temporary fix is to add a |
I think it's not a bug but feature ;-) 3ad084f You can switch it back to false globaly in configuration section:
|
/cc @dondi any chance you could take a look at this? |
OK I'll investigate. |
Quick update: I have been able to replicate this behavior and have written a unit test for it. Based on what I can replicate, the previous version (0.17.1) indeed does not remove the item from the dropdown, but the highlighted item when the dropdown is displayed for the first time does not match the pre-selected object either (initial highlighted item is always the first one). Is that what others saw in the previous release? If this is the behavior that everyone is used to, then even if it is not entirely correct, it will be useful to know that just reverting to this will suffice. However if I’m not seeing the correct prior behavior, or if the preference is to get this working completely right, then that changes the code trajectory a bit. Please advise—thanks! |
From my point of view, I've upgraded from 0.14.1 where the preselected item
was correctly displayed and highlighted, my vote would be to revert to this
expected behaviour. Thanks!
|
Make sure that `removeSelected` only affects `multiple`s, include unit test, and add comment in demo examples. Addresses angular-ui#1672 and possibly angular-ui#1681
OK, potential fix available at #1690 …I toggled between |
BTW @fiznool I was able to get this PR to implement the fully correct behavior where the pre-existing selection in the model is indeed highlighted from the get-go in the |
@p10 For me, it works when changing the value to |
@dondi I've just tested with a manually created build using Could you cut a new release? I'm installing using bower and so I need the |
Greetings @fiznool —Glad to hear your tests look good! I will have to defer to @user378230 with regard to releases. |
Bug description:
When linking the
ui-select
component to a model which points to an item in the items array, the preselected item is not displayed in the dropdown list.Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/bMlvGYc0Jfq3PX8NQcpv?p=preview
Notice that although 'Amalie' is preselected, she is not displayed in the dropdown list.
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Angular: 1.5.0
UI-Select: 0.18.0
Bootstrap/Select2/Selectize CSS (if applicable): 3.1.1
The text was updated successfully, but these errors were encountered: