Reputation: 13
I have an autocomplete list which is composed of two varieties of inputs - Airports and Resorts. I want to add separator text delineating each set of Autocomplete options. Like this Delienated options
However, all I have been able to manage to do is add the 'Separator' labels as items to the options list. Like This: 'Separator' labels added as items to the options list
The problem is
Is there any other way to create 'Separator Labels' in md-autocomplete? Or any way to at least solve the above two problems highlighted?
Upvotes: 1
Views: 529
Reputation: 256
md-autocomplete hasn't this feature. But you can emulate autocomplete with md-select
<md-select ng-model="destination" multiple>
<md-optgroup label="Airpot">
<md-option ng-value="destination.name" ng-repeat="airport in destinations | filter: {category: 'airport' }">{{airport.name}}</md-option>
</md-optgroup>
</md-select>
<md-optgroup>
is the thing which allow to create not selectable item (headers of categories)
Upvotes: 1