Open topherfangio opened 7 years ago
i'm having some confusion about this. when i retrieve data from an http promise and change ctrl.searchText to the result of the promise, i'd expect the selectedItemChange to fire, but it doesn't unless i manually click on the field. only then is the searchText sent correctly and item is selected.
Actual Behavior:
What is the issue? *
md-selected-item-change
fires more often than expected.What is the expected behavior?
Users expect themd-selected-item-change
event to fire only when an actual item has been selected. It currently fires whenever the selected item changes, even if that is to itself or to a non-item. This typically happens when an item is selected, and then the user types another character in the autocomplete and themd-selected-item-change
fires with a value ofundefined
.Proposal: *
We should consider adding a separate
md-on-select
to the<md-autocomplete>
that behaves more like themd-on-select
from the<md-select>
component.AngularJS Versions: *
AngularJS Version:
N/AAngularJS Material Version:
1.1.3References #3003. References #9970.