material icon indicating copy to clipboard operation
material copied to clipboard

md-autocomplete: make clear button optional

Open osuritz opened this issue 11 years ago • 10 comments

Our UI designer is asking us to remove the clear button from the autocomplete component in a specific situation. I am wondering if there should be an attribute for md-autocomplete such as disable-clear="true" or if we should just use CSS to hide that button in the particular case.

Thoughts?

osuritz avatar Sep 25 '15 19:09 osuritz

I'd prefer to have it disabled by default and have an attribute to enable it, but it's probably more consistent design to have the negative case. Perhaps md-no-clear to be consistent with md-no-float?

ghost avatar Sep 26 '15 09:09 ghost

I was thinking we could add an md-clear-icon attribute, but set it to true by default, and you can just set it to false if you don't want it.

Edit: Later, we could potentially add support for a URL pointing to another icon in addition to true/false.

topherfangio avatar Sep 26 '15 15:09 topherfangio

+1 - I should be able to remove the clear button. It gets in the way of my UI.

evanjmg avatar Jul 03 '16 13:07 evanjmg

+1 i also want this functionality in angular material

amar-socgen avatar Sep 23 '16 15:09 amar-socgen

+1 please

mr-White avatar Sep 29 '16 21:09 mr-White

+1

diegomanjarres avatar Oct 03 '16 00:10 diegomanjarres

+1

gustavo-moreira avatar Oct 14 '16 23:10 gustavo-moreira

Re-open based on community votes. @topherfangio - we should identify the best API do accomplish this; perhaps simply a class="md-hide-clear-button"

ThomasBurleson avatar Oct 15 '16 01:10 ThomasBurleson

I think the class="md-hide-clear-button" is simple enough and does the job. No need for a custom directive ar anything like that, since any other customization to the button can be achieved via CSS.

gustavo-moreira avatar Oct 15 '16 04:10 gustavo-moreira

Discussed with team; we will add a CSS class to hide these. Should look at Datepicker to see existing class names.

topherfangio avatar Oct 17 '16 17:10 topherfangio