-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[AutoComplete] Trigger's optionSelections throw error when no md-options provided #4616
Comments
I had the same issue. In my app, I wanted to differentiate selection via the autocomplete from input. So I had to subscribe |
Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes angular#4616.
Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes angular#4616.
Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes angular#4616.
Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes angular#4616.
Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes angular#4616.
) Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes #4616.
…gular#8802) Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized. Fixes angular#4616.
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. |
Bug, feature request, or proposal:
I have the following setup, and the options are generated on the fly e.g. when users types 2 characters and the search service return the result
and when I was trying to use triggers, it throw exceptions
I took a look at the autocomplete source code, it seems you did not handle the situation that options are null
What is the expected behavior?
Even options are null, we are allowed to use streams to listen
What is the current behavior?
Throw errors when no options provided
What are the steps to reproduce?
just as above said
What is the use-case or motivation for changing an existing behavior?
streams should not rely on the options
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
windows 10, Angular 4, Material beta 5, Chrome 58.0.3029.110 (64-bit)
Is there anything else we should know?
none
The text was updated successfully, but these errors were encountered: