Skip to content
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.

Is it possible to Iterating over objects with multiple selection?  #1255

Closed
@Avien

Description

@Avien

When trying this template:

<ui-select multiple
               theme="select2"
               class="{{multiSelect.className}}"
               ng-model="multiSelect.ngModel"
               ng-disabled="disabled"
               on-select="multiSelect.selectModel()"
               on-remove="multiSelect.handleRemove()"
               focus-on="{{multiSelect.focusOn}}">
        <ui-select-match placeholder="{{multiSelect.placeHolder}}">{{$item.label || $item.name}}</ui-select-match>
        <ui-select-choices repeat="item.key as (key, item) in multiSelect.items | filter:$select.search">
            {{item.label || item.name}}
        </ui-select-choices>
    </ui-select>

I get the following errors:
TypeError: $select.refreshItems is not a function
TypeError: Cannot convert undefined or null to object

The only documentation I am trying to follow are these examples, which are for single selection:
http://plnkr.co/edit/9DsLidTZR7RJDEq6PW0H?p=preview

My object looks like this:

"campaignsMap":{
        "2672":{
            "id":2672,
            "name":"Engage Push Accept"
        },
        "1419":{
            "id": 1419,
            "name": "adSelected"
        },
        "1771":{
            "id": 1771,
            "name": "Close App"
        },
        "1979":{
            "id": 1979,
            "name": "Ad Selected"
        }
}

Help please,
Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions