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
is there a way to set a custom component as the default component without having to apply that component every time a toast is fired and instead just being able to set the props on the message?
I have found the option to overwrite the default options on a per toast type basis. However, this only adjusts the duration, hideProgressBar, and the like. I have not yet figured out how to overwrite / set a custom component as the default.
Here is how it works now:
importToastyComponentfrom'@/components/ToastyComponent.vue'consttoast=useToast()toast.error({component: ToastyComponent,props: {message: 'Ein Fehler ist aufgetreten.',},})
Here is how I would like it to work:
importToastyComponentfrom'@/components/ToastyComponent.vue'toast.setDefaultComponent(ToastyComponent)// or maybe make it part of the init / update default options?
consttoast=useToast()toast.error({props: {message: 'Ein Fehler ist aufgetreten.',},})
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Dear Toastification Community,
is there a way to set a custom component as the default component without having to apply that component every time a toast is fired and instead just being able to set the props on the message?
I have found the option to overwrite the default options on a per toast type basis. However, this only adjusts the duration, hideProgressBar, and the like. I have not yet figured out how to overwrite / set a custom component as the default.
Here is how it works now:
Here is how I would like it to work:
Beta Was this translation helpful? Give feedback.
All reactions