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.
Option groups #48
Closed
Description
I like this lib, it's good replacement to select2 in angular projects. Now there is lacks only list grouping which exists in native select and select2. I see your plans on it in your roadmap and I suggest to discuss future feature api here.
I propose the new keyword in repeat option — group by
, like it used in angular select
directive in ng-options
attribute:
<ui-select ng-model="person.selected" theme="select2" class="form-control">
<match placeholder="Select or search a person in the list...">{{$select.selected.name}}</match>
<choices repeat="group by item.department for item in people">
<span ng-bind-html="item.name | highlight: $select.search"></span>
<small ng-bind-html="item.email | highlight: $select.search"></small>
</choices>
</ui-select>
I can try implement this feature, if you approve this grouping definition