This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
Programmatically setting md-search-text
in md-autocomplete opens dropdown
#2767
Milestone
Hi there!
I came across this quirk in
md-autocomplete
, with the following steps -:md-search-text
programmatically, say 'Steve'.md-selected-item
programmatically to a hash, say{name: 'Steve', id: 2}
(not necessary for quirk reproduction - I need it for my own purposes).Now the clincher is that there are multiple results corresponding to 'Steve' (different people with the same first name?), and this causes the dropdown list to open up. I don't need the dropdown list to open up at this point - I've already made the right selection. Is there a way to prevent the opening of the dropdown if I'm making the selection programmatically?
On the other hand, if there aren't multiple results,
md-autocomplete
still tries to fire a search. This, again, isn't really needed as I've already made the right selection.Example CodePen which demonstrates the issue (line 15 in JS).
The text was updated successfully, but these errors were encountered: