material icon indicating copy to clipboard operation
material copied to clipboard

mdAutocomplete: ng-disabled retains the cancel search button

Open zlovin opened this issue 11 years ago • 4 comments

The cancel button on md-autocomplete is still present when the autocomplete is disabled. When clicked, the search clears and no text can be entered.

Should the cancel button be hidden when the autocomplete is ng-disabed?

The demo on https://material.angularjs.org/#/demo/material.components.autocomplete demonstrates the issue.

zlovin avatar Feb 27 '15 20:02 zlovin

+1

jwmay2012 avatar Mar 02 '15 14:03 jwmay2012

Hi there, seems like the issue is still present in 1.1.8. Again the demo can be used to reproduce.

rhautefeuille avatar Apr 20 '18 16:04 rhautefeuille

@rhautefeuille this was changed in 1.1.5 via https://github.com/angular/material/pull/10603. The description of that PR has some info that may be helpful to you:

If the developer doesn't want a clear button when the control is disabled, they can simply update their boolean expression inside of the md-clear-button attribute.

Splaktar avatar Apr 20 '18 22:04 Splaktar

I opened PR https://github.com/angular/material/pull/11248 to clarify the documentation in regards to this change in 1.1.5.

Splaktar avatar Apr 20 '18 23:04 Splaktar