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
1
vote
1 answer

how to do validation in md-autocomplete+md-chip

I need to do validation in autocomplete like min length max length total number of chip I dint find a correct way to validate all these validations my HTML is
1
vote
0 answers

Validating in Angular

I have an which has a control that's required. The control is touched and invalid, however it doesn't display any error.
Nicolas
  • 4,526
  • 17
  • 50
  • 87
1
vote
0 answers

How do I filter on md-menu-container-class?

I needed to make a condition to put the class or not, however the md-autocomplete does not allow. Does anyone know how to do it? I have tried to pass from controller to view, but it seems that this property only accepts string and runtime change…
Danielle
  • 71
  • 1
  • 10
1
vote
0 answers

create md-autocomplete in angular-material2 with minimal 3 characters then start search the autocomplete

we want to create autocomplete that only if user type 3 characters first then autocomplete is suggesting what's inside database. because the database have around 85,000 objects stored in the server, so the performance is really bad if we have to…
1
vote
0 answers
1
vote
1 answer

md-autocomplete dropdown size not stable

I'm using an existing md-autocomplete input. My issue is that the size of the dropdown is variable. It may have a lot of result in the dropdown and still it limits the size of the md-autocomplete to 2. And we can scroll to access all of them. But…
1
vote
0 answers

Issue with md-autocomplete?

I am using this for autocomplete. If user wants to search his/her name and he/she types the name, after three characters the respective names will come (the search bar available in top bar on dashboard). After scrolling the dashboard user wants to…
Ajay
  • 307
  • 4
  • 14
1
vote
1 answer

md-autocomplete generating the same model in ng-repeat

md-autocomplete generating the same model in ng-repeat if the value of one changes reflect in other fields as well, How can I add different ng model to it?
Mohammad Fareed
  • 1,927
  • 6
  • 26
  • 59
1
vote
1 answer

md-autocomplete angular2 getting data from server shows empty dropdown on focus (but fills when first typing)

I'm getting data from an Angular2 service and trying to put in the autocomplete component. When the user focus the autocomplete component, the dropdown opens empty, but when user types something, the dropdown shows the result. I want to show all…
Fabrizio
  • 89
  • 1
  • 1
  • 8
1
vote
1 answer

How to populate md-autocomplete dropdown list?

I'm trying use md-autocomplete with $http(), I can see the values in the console, but I can't display the data returned from the api request to the autocomplete. I tried using the return keyword to return values stored in the JSON array. …
Yacub Ali
  • 137
  • 2
  • 11
1
vote
1 answer

md-autocomplete doesn't work after once

I've made a simple auto complete functionality on text search. There are two functions - querySearch(searchText) and homeresults(item). The querySearch function correctly fetches the results and there is no issue there. Once a result is selected by…
Gurdeep
  • 11
  • 1
  • 1
1
vote
0 answers

$http requests are getting cancelled on Enter key in md-autocomplete

I am using angularjs 1.5 and while using md-autocomplete with $http request to fetch the list if i press enter key when some http calls are in pending state then all the pending requests are getting cancelled automatically. here is my code…
1
vote
0 answers

Angular Material mdAutocomplete mdChips selected

Angular js version 1.5.9 Angular material 1.1.3 Using md-chips with md-autocomplete, when selecting a chip with the keyboard, after deleting it, the md-autocomplete will still think the keyboard is selecting it. An example is better than words :…
Theo
  • 157
  • 12
1
vote
2 answers

Angular 2 mdAutocomplete 2 way data binding

I'm trying to create Angular 2 MdAutocomplete with custom object data and having trouble with getting and setting object data. It looks good with filtering and displaying but not binding data, it's not setting item on edit form and not getting item…
1
vote
0 answers

Angular - Material md-auto complete search suggestions invisible

I have taken the example angular gives on their website and directly put it into my express js app to play around with it and adapt it to what I need. However, for some reason the search suggestions are invisible. I know they are there because I can…
jped
  • 486
  • 6
  • 19
1 2 3
8 9