forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Display ShowToastEvent #36

Open monirkohi2006 opened 4 years ago

monirkohi2006 commented 4 years ago

Is your feature request related to a problem? Please describe. this.dispatchEvent(new ShowToastEvent({..})) doesn't display toast while in dev server.

Describe the solution you'd like this.dispatchEvent(new ShowToastEvent({..})) should display a toast while in dev server.

Describe alternatives you've considered Currently utilizing console.log(...) or pushing the code to sandbox to test.

Additional context

KrisGraySFDC commented 4 years ago

What a toast is means different things depending on where your code is executing. If you want the standard Lightning Experience toast, we're working to expose the Lightning Experience "container" so you can preview your components in that context.

We are also considering just surfacing showing which events got displayed. You wouldn't see the toast, but you could see that the ShowToastEvent got fired and bubbled up to the preview.

monirkohi2006 commented 4 years ago

This feature request is about wanting the standard Lightning Experience toast. It would be nice to expose the Lightning Experience "container" so that we can preview our components in that context.

KrisGraySFDC commented 4 years ago

Completely agree. I think Toast is there, its just not listening for the event.