Answers for "toast message in lwc when data inserted"

1

toast message in lwc when data inserted

showSuccessToast() {
    const evt = new ShowToastEvent({
        title: 'Toast Success',
        message: 'Opearion sucessful',
        variant: 'success',
        mode: 'dismissable'
    });
    this.dispatchEvent(evt);
}
Posted by: Guest on January-06-2021
0

toast message in lwc when data inserted

showErrorToast() {
    const evt = new ShowToastEvent({
        title: 'Toast Error',
        message: 'Some unexpected error',
        variant: 'error',
        mode: 'dismissable'
    });
    this.dispatchEvent(evt);
}
Posted by: Guest on January-06-2021

Browse Popular Code Answers by Language