-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Input changedetection not triggered when input is used as autocomplete-trigger and OnPush ChangeDetectionStrategy used #5271
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
Most of the inputs are already working in OnPush, but input used as MdAutocomplete-trigger is not yet working. Therefore I think this issue is valid. |
All the autocomplete-trigger is doing is taking the value you provide and setting the native input's value with the results of You can see in this plunker that it's the exact same thing with the input when you set the value after initializing it: http://plnkr.co/edit/4olO7E?p=preview Basically it's all the same underneath. I acknowledge there is some trickery happening with the trigger manually floating and resetting the placeholder, but those methods are only run during the opening and closing of the panel and are not related to simply setting the value of the control. Again, I may be wrong but when #3005 is fixed, it seems this too will be. 😃 |
Closing as it looks like this has been resolved if you are still seeing the issue feel free to open up an issue for us to take a look. |
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:
When using OnPush changedetection strategy, input with mdAutocomplete directive is not triggering changedetection when value is set in initialization.
What is the expected behavior?
When formcontrol value is set, changedetection should be triggered and placeholder text should be elevated.
What is the current behavior?
When formcontrol value is set, changedetection is not triggered. If there is placeholder text, it is not elevated when input value is set on initialization.
What are the steps to reproduce?
In linked plunker there is two md-inputs other with mdAutocomplete and other normal. Input placeholder text is elevated on normal md-input but not in input with autocomplete.
http://plnkr.co/edit/eLpDqe?p=preview
What is the use-case or motivation for changing an existing behavior?
To be able to use OnPush-changeDetectionstrategy.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.2.3
Material 2.0.0-beta.7
Is there anything else we should know?
nope
The text was updated successfully, but these errors were encountered: