You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If somebody will ever come across this issue and it will be still not resolved, there's actually a hack to make it work
On click:
const toastRef = NbToastrService.show(...)
((<any>toastRef)['toastContainer']).nativeElement.addEventListener('click', () => {
// do stuff here
})
It works because toastRef has container, but it is private, so we trick ts compiler with any and access that field. In the container we have nativeElement which is just HTMLElement and we can do with it anything that js can do, add listeners, get styles, etc
On close is trickier but something like this should work:
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
Toast events are not available as in other components like dialogs, methods like onClick() or onClose()
Expected behavior:
Should add onClose or onClick subscribe events to Toast reference
The text was updated successfully, but these errors were encountered: