This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
Select with multiple resets bound ng-model on initialization #433
Closed
Description
We're having an annoying issue with the multi-select box and loading an initial value for its ng-model. For some reason it blanks the bound field on initialization. If the initial value is [12, 13, 14] - as soon as the ui-select directive is loaded it get reset to []. All the options show up OK, though. We've also made sure that when we do select values in the select box, it does indeed update the bound model in the correct format (int array, [12, 13, 14]).
Here is our markup:
<ui-select id="Keoni_Agility_ObjectPreviewAttributes"
multiple
ng-model="settings.Keoni_Agility_ObjectPreviewAttributes.value"
theme="bootstrap" style="width: 100%" >
<ui-select-match placeholder="Choose an attribute">{{$item.name}}</ui-select-match>
<ui-select-choices repeat="attr.id as attr in viewModel.generalAttributes | filter: $select.search">
<div>{{attr.name}}</div>
</ui-select-choices>
</ui-select>
The options are loaded from an Object array, where we use their respective id's as their selection value.
Metadata
Metadata
Assignees
Labels
No labels