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
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
input-container: not showing ng-messages error by default even when md-auto-hide="false" is applied #9723
What is the issue? *: Under md-input-container, when applied md-auto-hide="false" tong-messages, error message(s) is not shown by default.
What is the expected behavior?: If the input is invalid, error message(s) should be shown by default when md-auto-hide="false" is applied on ng-messages.
Details: I realized that the reason why the example on Angular Material Input Errors demo works is each tag, where ng-message resides, has an inline styles of style="opacity: 1; margin-top: 0px;".
changed the title [-]md-input-container not showing ng-messages error by default even when md-auto-hide="false"[/-][+]md-input-container not showing ng-messages error by default even when md-auto-hide="false" is applied[/+]on Sep 29, 2016
changed the title [-]md-input-container not showing ng-messages error by default even when md-auto-hide="false" is applied[/-][+]input-container: not showing ng-messages error by default even when md-auto-hide="false" is applied[/+]on Feb 12, 2019
Activity
[-]md-input-container not showing ng-messages error by default even when md-auto-hide="false"[/-][+]md-input-container not showing ng-messages error by default even when md-auto-hide="false" is applied[/+]nghilevi commentedon Sep 29, 2016
Currently my quick and dirty fix in our project is:
Add these lines of code to
https://github.com/angular/material/blob/master/src/components/input/input.scss
This ensure that the error message will be appeared from the start when there is no
md-auto-hide.Also I replaced this logic:
https://github.com/angular/material/blob/master/src/components/input/input.js#L993-L995
with this:
Still the label is NOT colored red by default. I have tried this but it didn't work:
I guess to make that possible some logic inside
inputTextareaDirectiveshould be changed.mikila85 commentedon Oct 30, 2016
+1
6 remaining items
fix(input): move messages animations back to CSS
fix(input): move messages animations back to CSS
fix(input): move messages animations back to CSS
fix(input): correct initial animation state of messages
fix(input): correct initial animation state of messages
fix(input): correct initial animation state of messages (#10246)
[-]md-input-container not showing ng-messages error by default even when md-auto-hide="false" is applied[/-][+]input-container: not showing ng-messages error by default even when md-auto-hide="false" is applied[/+]Splaktar commentedon Feb 12, 2019
Fixed in
1.1.5via 0151b4b.