From 6e4190ceb8136da73b205e16004b6a821165f5f9 Mon Sep 17 00:00:00 2001 From: Philippe Ozil Date: Tue, 8 Aug 2023 19:16:01 +0200 Subject: [PATCH] feat: add toast details in platformShowToastEvent stub (#331) * feat: allow to pass toast details in stub * fix: formatting --- .../platformShowToastEvent/platformShowToastEvent.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lightning-stubs/platformShowToastEvent/platformShowToastEvent.js b/src/lightning-stubs/platformShowToastEvent/platformShowToastEvent.js index 21b29bd..f38a0f5 100644 --- a/src/lightning-stubs/platformShowToastEvent/platformShowToastEvent.js +++ b/src/lightning-stubs/platformShowToastEvent/platformShowToastEvent.js @@ -7,11 +7,12 @@ const ShowToastEventName = 'lightning__showtoast'; export class ShowToastEvent extends CustomEvent { - constructor() { + constructor(toast) { super(ShowToastEventName, { composed: true, cancelable: true, bubbles: true, + detail: toast, }); } }