This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-icon / md-list : secondary action cannot be hidden or disabled #5297
Labels
Milestone
Comments
I have encountered this same bug. An ng-if="false" on an icon with md-secondary is still clickable even though it is invisible. The console also warns that the aria-label is missing for a button with class "md-secondary-container ..." which must be something that md-angular creates around the md-icon, but doesn't remove from the dom when the icon's ng-if is false. |
Note that the bug persists even when you wrap the md-secondary icon with a div with ng-if="false". I don't see any workaround. |
Also ran into this issue now. |
+1 |
+1 |
+1 |
EladBezalel
added a commit
that referenced
this issue
Nov 30, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
jsFiddle : https://jsfiddle.net/xwn6dgyv/2/
NB : I'm not sure the link declared in the CSS for the icon font is permanent ; in case the icons do not appear, open [https://fonts.googleapis.com/icon?family=Material+Icons] and paste the content in the CSS zone. I did not manage to import the fonts using the jsFiddle external resources manager.
I might have missed something, but I cannot seem to properly disable the secondary action inside a list. The jsFiddle is based on the demo for the list component, so it should look familiar.
I need to display (and enable) the secondary action iff some external criteria is true. But the best I can do is to hide the icon - the blank which replaces it remains clickable.
ng-if and ng-show give the same result. Wrapping the icon inside a button and moving ng-if or ng-show to button level does even less.
The text was updated successfully, but these errors were encountered: