You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given I am using a promise and I am hydrating my ngModel with previously collected data, the sc-select directive cannot acknowledge an item from the list as already being selected. Ideally, you would be able to track by item id in the sc-options attribute.
Below I have a pre-selected item in the model, but I can see the sc-select also shows the duplicate item:
Selecting the duplicate item shows them both in the array now:
As a workaround, I can check for and reject duplicate items as part of the promise. Psuedo code:
Given I am using a promise and I am hydrating my ngModel with previously collected data, the sc-select directive cannot acknowledge an item from the list as already being selected. Ideally, you would be able to track by item id in the
sc-options
attribute.Below I have a pre-selected item in the model, but I can see the sc-select also shows the duplicate item:
Selecting the duplicate item shows them both in the array now:
As a workaround, I can check for and reject duplicate items as part of the promise. Psuedo code:
However, that item will then be unavailable from the select dropdown if the user decides they want to un-select the item then re-select it.
Possibly related? angular-ui/ui-select#665
The text was updated successfully, but these errors were encountered: