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
The type definition for the close event shows that the argument for the close event is ToastMessageOptions. However, during testing, I discovered that the code was emitting an object that wraps the message. In other words, during runtime, I was receiving more like the following.
typeCloseEvent={message: ToastMessageOptions}
I suggested modifying the type definition, however I believe the toast close event could be modified to not wrap it. This would be a breaking change for existing users though.
Describe the bug
The type definition for the close event shows that the argument for the
close
event isToastMessageOptions
. However, during testing, I discovered that the code was emitting an object that wraps the message. In other words, during runtime, I was receiving more like the following.I suggested modifying the type definition, however I believe the toast close event could be modified to not wrap it. This would be a breaking change for existing users though.
Type Definition
https://github.com/primefaces/primevue/blob/master/components/lib/toast/Toast.d.ts#L329-L340
Wrapping of Message
primevue/components/lib/toast/Toast.vue
Lines 74 to 86 in 344ec64
Reproducer
https://stackblitz.com/edit/primevue-nuxt-issue-template-fapfro?file=app.vue
PrimeVue version
3.50.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
<Toast />
component.@close
event handler.Expected behavior
I expected the argument to be of type
ToastMessageOptions
.The text was updated successfully, but these errors were encountered: