kernal_lora
kernal_lora

Reputation: 1155

How to show angular material auto-complete all items even one item is selected?

Angular material default functionality is when user selects one item from auto-completion list remaining items are not showing.

Eg: When I click on the control it's showing like this enter image description here

After one item selected it is not showing remaining list.

enter image description here

Here I wanna show all auto-complete items even user selects one items from the list.

Is this possible with angular material? If yes could you please help how can we achieve this.

I need output like this(Below image I edited in paint).

enter image description here

Upvotes: 1

Views: 1333

Answers (1)

silex
silex

Reputation: 4320

If we are talking about basic example from https://material.angularjs.org/latest/demo/autocomplete, just try:

md-items="item in ctrl.states"

instead of

md-items="item in ctrl.querySearch(ctrl.searchText)"

because of controller filter the initial list in

results = query ? self.states.filter( createFilterFor(query) ) : self.states

Upvotes: 0

Related Questions