Is there any way to display HTML in a Toast popup?
I'd like to display a list of error messages, and not just a single string.
Is there any way to display HTML in a Toast popup?
I'd like to display a list of error messages, and not just a single string.
Toast event can only have string message. Even if you try to pass html in message, it will be interpreted as text. You can use multiple toast events to show all the errors you have. Or, you can create your own toast component using the lightningdesignsystem toast blueprint. Add a slot inside the div with class slds-notify__content. You can add it wherever you want and control its rendering with the if:true directive.
<div class="slds-notify__content">
<slot></slot>
</div>