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
Currently, I’m working on customizing components for our design system. This involves an animated icon to indicate waiting states. However, there’s no way to add a custom status right now because the add method, due to TypeScript constraints, doesn’t allow specifying custom values. I also noticed that all properties passed to the add method are forwarded to the message slot. But due to TypeScript, we can’t pass custom parameters, which further complicates customization or makes it impossible. Similarly, I wrote about the ConfirmationOptions type in the ConfirmDialog component. Adding a separate custom Toast with its own group isn’t a viable solution because if Toasts from different groups are triggered, they overlap with each other.
It already works as expected now. We need to refine the ToastMessageOptions type to allow specifying custom statuses and enable adding custom values to the add method. Also, note the ConfirmationOptions type, as it has the same issue with the require method. All properties passed to this method end up in the slot, but TypeScript restricts this.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently, I’m working on customizing components for our design system. This involves an animated icon to indicate waiting states. However, there’s no way to add a custom status right now because the add method, due to TypeScript constraints, doesn’t allow specifying custom values. I also noticed that all properties passed to the add method are forwarded to the message slot. But due to TypeScript, we can’t pass custom parameters, which further complicates customization or makes it impossible. Similarly, I wrote about the ConfirmationOptions type in the ConfirmDialog component. Adding a separate custom Toast with its own group isn’t a viable solution because if Toasts from different groups are triggered, they overlap with each other.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-exl2r6ct?file=src%2FApp.vue
Environment
Vue version
3.5.12
PrimeVue version
4.0.7
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
const toast = useToast();
add
methodExpected behavior
It already works as expected now. We need to refine the ToastMessageOptions type to allow specifying custom statuses and enable adding custom values to the add method. Also, note the ConfirmationOptions type, as it has the same issue with the
require
method. All properties passed to this method end up in the slot, but TypeScript restricts this.The text was updated successfully, but these errors were encountered: