I have a dialog with few field to set, the first field is a md-autocomplete
, when I click ok all these fields are cleaned, so, I want set focus true in the md-autocomplete
, for starting to filling data again.
You can do that by adding attribute
md-autofocus
an example:
<md-autocomplete md-autofocus 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>
ref : here
Regards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With