You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In my application, I need to be able to dynamically apply icons, and sometimes remove them.
Describe the solution you'd like
I'd like to be able to set icon.name = ''; or icon.name = null; and have that remove the current icon.
Describe alternatives you've considered
I can currently use the custom resolver with a magic truthy string and a blank SVG to accomplish what I need, but it'd be a lot simpler to be able to remove the icon.
The text was updated successfully, but these errors were encountered:
At least for my application, I don't think so. I have a library of >6,800 icons that users can choose from, or they can choose no icon at all. I'd have to add logic to every component that implements an icon to handle the falsey scenario.
Honestly, this would be easier if the library resolver got called even if the icon name was falsey, but how it's written right now, I don't feel like I have any generic way to handle the "no icon" scenario.
Inside of setIcon()
if (this.name && library) {
url = library.resolver(this.name);
}
I wonder if it's as simple as letting the library resolver have a shot at it.
Is your feature request related to a problem? Please describe.
In my application, I need to be able to dynamically apply icons, and sometimes remove them.
Describe the solution you'd like
I'd like to be able to set
icon.name = '';
oricon.name = null;
and have that remove the current icon.Describe alternatives you've considered
I can currently use the custom resolver with a magic truthy string and a blank SVG to accomplish what I need, but it'd be a lot simpler to be able to remove the icon.
The text was updated successfully, but these errors were encountered: