You need to sign in to do that
Don't have an account?
Abers55
Displaying an icon on toastEvent
I've written a very simple component to play around with toastEvents, but, I'm having trouble getting them to display an icon of my chosing. The documentation says to set the type parameter to "other" and then use an icon defined in the SLDS. Here's my code:
Component
Component
<aura:component implements="flexipage:availableForAllPageTypes"> <lightning:button variant="brand" label="Toast" iconName="utility:event" iconPosition="left" onclick="{! c.handleClick }" /> </aura:component>Controller
({ handleClick : function(component, event, helper) { var toastEvent = $A.get("e.force:showToast"); toastEvent.setParams({ "title": "The toast pops up", "message": "Toast event fired", "mode": "sticky", "type": "other", "key": "utility:event" }); toastEvent.fire(); } })No matter what value I supply in the key parameter, I can't seem to get a result and there don't seem to be any examples of it's use. Anyone out there succeeded with this?