I have a custom Lightning Web Component that I am using in a Flow. Unfortunately, the standard ShowToastEvent
event does not work when an LWC is in a Flow.
Is there an alternative component I can use for this? Not necessarily a toast message, but something I can use without creating a separate component.
Something like on the standard detail page perhaps?
This is my component, and I want to handle any errors from the delete button.
<template>
<lightning-record-form
record-id={recordId}
object-api-name={objectApiName}
layout-type="Full"
mode="view"
></lightning-record-form>
<template if:true={showDeleteButton}>
<lightning-button variant="destructive" label="Delete" icon-name="utility:delete" onclick={handleDelete}></lightning-button>
</template>
</template>
slds-text-color_error
but it doesn't look that great as it's just the text..slds-theme_error
theme, or presentation of the error in an alert. Other options are available.