You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
latest Material build from master branch
Is there anything else we should know?
The main issue has been solved by #2455, I'm not sure if this is a bug or not. In my example, once the observable emits 4, the child component gets this value, it shows it on the view and the input also sets its value to 4 but NG is not aware of the change. It needs another change detection cycle to do so (e.g. by clicking in one of the fields).
The text was updated successfully, but these errors were encountered:
@abdulhaq-e In the plunker, you're changing the value in the AfterViewChecked hook, which by definition runs after change detection. This is why the view is not updated.
If you change your code to use the ngOnChanges hook, it will update the value every time your @input changes but before change detection runs. This way, the placeholder state will update at the right time.
Bug, feature request, or proposal:
Bug (I think)
What is the expected behavior?
For
mdInput
to work properly. If a value exists in the box then the placeholder should be over it not on it.What is the current behavior?
The placeholder is inside the box even though there is a value bound to the input.
What are the steps to reproduce?
http://plnkr.co/edit/eyN8D8oZuEwDhHLINsZ5?p=preview
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
latest Material build from master branch
Is there anything else we should know?
The main issue has been solved by #2455, I'm not sure if this is a bug or not. In my example, once the observable emits
4
, the child component gets this value, it shows it on the view and the input also sets its value to4
but NG is not aware of the change. It needs another change detection cycle to do so (e.g. by clicking in one of the fields).The text was updated successfully, but these errors were encountered: