Flagging in ui-select (angular-ui) mulitselect

I've searched a lot but couldn't find a working solution for this. I have a ui-select multiselect UI-SELECT . Using the "tagging" and "tagging-label" attributes, we can add custom tags to the list. an example is given in this plunker .

<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="multipleDemo.colors" title="Choose a color">
    <ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>
    <ui-select-choices repeat="color in availableColors | filter:$select.search">
      {{color}}
    </ui-select-choices>
  </ui-select>

      

When we print if the "custom-tag" suggestion is shown at the top of the list. How do I go to the bottom of the list?

Example: when g is printed, the options displayed in the dropdown list are

[ g(custom 'new' label), Green, Magenta ]

      

but I want the order to be

[ Green, Magenta, g(custom 'new' label) ]

      

+3


source to share


1 answer


According to the documentation, there doesn't seem to be any way to do this without changing the source code angular-ui

. A possible workaround would be to install tagging-label="false"

that will remove the "new" label option.



This would be fine if you don't want this parameter, which might be the case when you try to put it in the options list.

0


source







All Articles