There is no public api users can consume that tells them whether an autocomplete is open on MdAutocomplete. We should add one.
Hi @jelbourn, I'd like to work on that feature.
We have some emitters for the select component such as onOpen and onClose.
I wonder if that would be the best approach or should we publicly export the property showPanel?
Thanks
@leocaseiro I was just imagining an isOpen property on MdAutocomplete
This can already be done with the panelOpen property on MdAutocompleteTrigger. I updated this Plunker to prove myself it works.
@jelbourn, do you want to offer it directly in the MdAutocomplete, or should this be fine?
@carlos- Can't speak for the original intent, but I think this would be nice
<md-autocomplete #auto="mdAutocomplete">
<md-option *ngFor="let state of filteredStates | async" [value]="state">
{{ state }}
</md-option>
</md-autocomplete>
isOpen: {{auto.isOpen}}
since it would eliminate the need for this:
@ViewChild(MdAutocompleteTrigger) trigger: MdAutocompleteTrigger;
isOpen() {
return this.trigger.panelOpen
}
@willshowell, I totally agree. On the other hand, the same could apply to openPanel and closePanel. Right?
@carlos- Thanks for the tip on using MdAutocompleteTrigger. I am using it successfully for one Autocomplete on the page. How can I use it with multiple Autocompletes on the same page?
Fixed by #7149
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._