-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(input): add example of a clearable input #3730
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
Conversation
I'm hesitant to change the examples here until we have them building. |
@mmalerba can you rebase? |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one a11y fix needed
@@ -0,0 +1,4 @@ | |||
<md-input-container class="example-input-container"> | |||
<input mdInput type="text" placeholder="Clearable input" [(ngModel)]="value"/> | |||
<md-icon mdSuffix *ngIf="value" (click)="value=''">close</md-icon> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be an md-icon-button
for a11y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So actually... md-icon-button
doesn't really work well as a suffix currently. It's too tall and it causes the placeholder and input text to be misaligned. Filed #4382 to fix this
icon-buttons are supported inside inputs now, updated example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Needs rebase |
* docs(input): add example of a clearable input * use icon button
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. |
fixes #3725