ui-select icon indicating copy to clipboard operation
ui-select copied to clipboard

Multiple clean ng-model value

Open luigibertaco opened this issue 11 years ago • 1 comments

I am trying to use the ui-select and the component is cleaning my array.

Example:

{{ vm.staff_hotels }}
<ui-select multiple ng-model="x" theme="bootstrap">
    <ui-select-match placeholder="Not selected">{{$item.name}}</ui-select-match>
    <ui-select-choices repeat="hotel.id as hotel in vm.hotels | filter: {active: true} | filter: $select.search">
        <div ng-bind-html="hotel.name | highlight: $select.search"></div>
    </ui-select-choices>
</ui-select>

My variable "vm.staff_hotels" value on screen is [1,2].

{{ vm.staff_hotels }}
<ui-select multiple ng-model="vm.staff_hotels" theme="bootstrap">
    <ui-select-match placeholder="Not selected">{{$item.name}}</ui-select-match>
    <ui-select-choices repeat="hotel.id as hotel in vm.hotels | filter: {active: true} | filter: $select.search">
        <div ng-bind-html="hotel.name | highlight: $select.search"></div>
    </ui-select-choices>
</ui-select>

but, if I use the variable in ng-model my value change to [null,null].

luigibertaco avatar May 21 '15 07:05 luigibertaco

Closing due to lack of info and repro.

If you believe this issue is still relevant please update with a plunkr (or similar) against the latest version of ui-select (currently v0.16.0)

user378230 avatar Mar 16 '16 20:03 user378230