-
Notifications
You must be signed in to change notification settings - Fork 6.8k
md-autocomplete optionsSelection #3280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc. Here is a plunker example though: https://plnkr.co/edit/AaBESvqvT40htQPlAp0b?p=preview. In the next release, you shouldn't have to merge the selection events yourself, see #3212 |
Thank you sorry |
thank you 're write |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What is the expected behavior?
I want to call a function when an option is selected. After some search it seem that i have to use :
property optionSelections of MdAutocompleteTrigger
In the documentation : https://material.angular.io/components/component/autocomplete optionSelections Stream of autocomplete option selections.
I dont understand that , what is a stream, how to implement this ?
What is the current behavior?
Iam able to have MdAutocompleteTrigger In my component i add : @ViewChild(MdAutocompleteTrigger) trigger:MdAutocompleteTrigger;
ngAfterContentInit() { setTimeout(() =>this.trigger.openPanel()); }
but i cannot use optionSelections, can someone can give me an exampleI try this ngAfterContentInit() { setTimeout(() => Observable.merge(...this.trigger.optionSelections) .subscribe((option)=>console.log(option))); } but not working
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: