Material: md-input clear button

Created on 11 May 2015  Â·  6Comments  Â·  Source: angular/material

I would to have an clear button visible when entering md-input of type search. Button should be displayed to the right and within search field itself

Most helpful comment

I tried using the autocomplete component and it does display the "clear" button. However, I want to have "md-input" styling rather than the autocomplete styling without the floating label. I think there should be an attribute added to determine if the clear icon should be displayed for md-input components.

All 6 comments

Have you taken a look at mdAutocomplete? @robertmesserle I wonder if the input in autocomplete should have type="search".

@marcysutton for <md-autocomplete> adding a type="search" seems like a good idea.

Totally agreed. Will make that change.

On Wed, May 13, 2015 at 11:22 AM, Thomas Burleson [email protected]
wrote:

@marcysutton https://github.com/marcysutton for
adding a type="search" seems like a good idea.

—
Reply to this email directly or view it on GitHub
https://github.com/angular/material/issues/2802#issuecomment-101766662.

I have a directive that could hep

http://plnkr.co/edit/Dje0l1?p=preview

I tried using the autocomplete component and it does display the "clear" button. However, I want to have "md-input" styling rather than the autocomplete styling without the floating label. I think there should be an attribute added to determine if the clear icon should be displayed for md-input components.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bobber205 picture bobber205  Â·  3Comments

buzybee83 picture buzybee83  Â·  3Comments

epelc picture epelc  Â·  3Comments

PeerInfinity picture PeerInfinity  Â·  3Comments

sbondor picture sbondor  Â·  3Comments