md-autocomplete: make clear button optional
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?
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?
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.
+1 - I should be able to remove the clear button. It gets in the way of my UI.
+1 i also want this functionality in angular material
+1 please
+1
+1
Re-open based on community votes.
@topherfangio - we should identify the best API do accomplish this; perhaps simply a class="md-hide-clear-button"
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.
Discussed with team; we will add a CSS class to hide these. Should look at Datepicker to see existing class names.