3

Using toasts in LWC to display notifications to user. mode: 'pester' does not appear to work, the toast still disappears after 3 seconds.

DOC: pester: Remains visible until the close button is clicked.

 handleWarning() {
const showWarning = new ShowToastEvent({
    title: 'Warning!',
    mode: 'pester',
    message: 'This is Warning message',
    variant: 'warning'
});
this.dispatchEvent(showWarning);  }

Other modes work fine (dismissable, sticky).

3

Caching issue. It is working as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.