Questions tagged [md-autocomplete]

is a special input component with a drop-down of all possible matches to a custom query. This component allows you to provide real-time suggestions as the user types in the input area.

docs

https://material.angularjs.org/latest/api/directive/mdAutocomplete

demo

https://material.angularjs.org/latest/demo/autocomplete

syntax

<md-autocomplete
    md-selected-item="selectedItem"
    md-search-text="searchText"
    md-items="item in getMatches(searchText)"
    md-item-text="item.display">
   <span md-highlight-text="searchText">{{item.display}}</span>
</md-autocomplete>

screenshot

enter image description here

131 questions
2
votes
1 answer

Remove the automatically selection of md-autocomplete in angular 4 material application

I have an angular 4 application with material design. In this applicatino I open a dialog with a form inside. In this form, I have an autocomplete field in first position. This is my html code :

Add…

Adrien
  • 2,866
  • 4
  • 23
  • 46
2
votes
0 answers

Angular material chips md-autocomplete not working on ng-repeat

I using Angular 1.5.5, and angular-material 1.1.0 here. When I adding md-chips in ng-repeat loop it do not working, I got follow error: angular.js:13550 TypeError: this.items.some is not a function at e.appendChip…
2
votes
1 answer

turn md-chips input field border red on blur if empty

I'm really new to angular (angular materials) and I'm working on this form that contains several fields (inputs, chips with autocomplete). The inputs that are required, on blur, if the field is left empty, they turn red. That does not happen to the…
solar apricot
  • 353
  • 2
  • 5
  • 24
2
votes
1 answer

AngularJS ui-select performance issues

I'm using UI Select control in my application(source - https://angular-ui.github.io/ui-select/). It has a major performance issue(lagging when populated wuth over ~2000 items). Tried using also mdAutocomplete(source -…
user1531186
  • 323
  • 1
  • 7
  • 20
2
votes
1 answer

Using ng-repeat in md-autocomplete to display auto suggestion and popular products

I'm trying to use angular material md-autocomplete directive to display two different things one is popular products and other is auto suggestions but you can only use one md-item for iteration so i decided to use ng-repeat. I used three loops first…
2
votes
0 answers

ng-message inside md-autocomplete shows with wrong style and overlaps the input field

I have an md-autocomplete with ng-messages inside of it:
OzW
  • 848
  • 1
  • 11
  • 24
2
votes
2 answers

Free Text Entry in Angular Material mdAutoComplete

I want my angular material autocomplete to be a list of suggestions but not requirements. However I'm not sure how to implement as their is no clear example from the Angular Material docs. In the example below my model is $ctrl.item.category Clearly…
Meeker
  • 5,979
  • 2
  • 20
  • 38
2
votes
1 answer

Autocomplete suggestions not shown after all chips removed (md-chips + md-autocomplete)

In my example (https://jsfiddle.net/vv18yjzo/7/) the autocomplete suggestions should be shown, as long as the md-chips input is focused. This works well when I enter a few items. However, when all available items are added and then removed, the…
2
votes
1 answer

AngularJS - Create a directive that uses ng-model and md-autocomplete

I am trying to create a directive for md-autocomplete. I tried using the answer provide by AngularJS - Create a directive that uses ng-model, but it does not work for me. My CodePen is here: http://codepen.io/colbroth/pen/QyMaQX/?editors=101. The…
2
votes
1 answer

Why my md-autoComplete is not displaying return values

I am using Angular Material for the first time. I am stuck with an issue with autocomplete. Below is my template:
Saurabh Tiwari
  • 4,632
  • 9
  • 42
  • 82
2
votes
0 answers

How to make md-autocomplete must select item?

I want the user to select the item in the drop down list of md-autocomplete. If they type text, but not selected, the input field will be clean after unfocus. An ideal help me please.
thanhbebi
  • 163
  • 1
  • 12
2
votes
1 answer

Angular Material md-autocomplete with md-chips doesn't clear search if blank

I am using md-autocomplete inside an md-chips. If I type 'a' and then select from the list, the control works correctly. however, if i don't type any search string and simply select from the list (because i want min-length=0), then the control…
1
vote
1 answer

md-autocomplete displays results as a list instead of dropdown

I am trying to use Angular Material md-autocomplete tag to display suggestions for zipcode in my form. I am calling an asynchronous service to get the suggestions and populate the results. I used the demo code on…
1
vote
1 answer

How can I get on my servlet the ID value instead the displayValue using md-autocomplete?

I have been learning angularjs for two weeks. I'm stuck technically in a simple problem, but I couldn't find an answer. I'm trying to use md-autocomplete in my project and I'm stuck because I want to get the id value instead of the display value in…
1
vote
3 answers

How to sort list start with first and then contains string search in md-autocomplete AngularJS

I'm new to angularJs and want to filter the search result. Here is the example : https://codepen.io/anon/pen/mpJyKm I want search result based on query input filtered such as string starts with come first in the result list and then contains. I'm…
Girish
  • 366
  • 3
  • 15
1 2
3
8 9