Build lightning fast Progressive Web Apps with zero config and best practices built-in. Go from zero to production ready with Ionic and Stencil (Web Components).
MIT License
633
stars
74
forks
source link
@Listen('body:ionToastWillDismiss') in app-main should be specific to the toastId #28
if you are using the ToastController in other app webcomponent ie page ,the page will continuously reload.
Expected behavior:
the toast inside the web component should present and dismiss without emiting to the Listen of the app-main meaning that the 'body:ionToastWillDismiss' is not enough specific and at the time we create the window.addEventListener('swUpdate'... we should be able to get the corresponding toastId ie swtoastId and modify the listen as follolw:
@Listen('body:ionToastWillDismiss')
if(toastId === swtoastId {
reload() {
window.location.reload();
}
}
Steps to reproduce:
easy to reproduce clone the ionic -pwa-toolkit in the app-profile add a toastController and create a toast and present it. the app-profile page will continuously reload
Related code:
Resources: Before submitting an issue, please consult our docs.
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x") [ x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
if you are using the ToastController in other app webcomponent ie page ,the page will continuously reload. Expected behavior:
the toast inside the web component should present and dismiss without emiting to the Listen of the app-main meaning that the 'body:ionToastWillDismiss' is not enough specific and at the time we create the window.addEventListener('swUpdate'... we should be able to get the corresponding toastId ie swtoastId and modify the listen as follolw: @Listen('body:ionToastWillDismiss') if(toastId === swtoastId { reload() { window.location.reload(); } }
Steps to reproduce:
easy to reproduce clone the ionic -pwa-toolkit in the app-profile add a toastController and create a toast and present it. the app-profile page will continuously reload Related code:
Other information: