Please implement the hover/pause behavior of the Toast component like the PrimeReact already has! #3088
Unanswered
RickKukiela
asked this question in
PrimeVue
Replies: 1 comment
-
I went ahead and just did the code change in a PR for this request. I hope this can find it's way into the codebase! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
This feature was apparently already added to the PrimeReact version two years ago!
primefaces/primereact#3272
Commit: primefaces/primereact@fd07f37
This is a huge UX/Usability issue for me and I hope very much that this can be added sooner than later. I tried switching to
sonner
for my toast needs because of a lack of this singular feature in my app but I really dislike the stacking nature of sonner so I'm stuck waiting on this.I could re-type the ask in detail, but the OP from the PrimeReact issue linked above does it just fine so I'll just copy and paste that text here (obviously the syntax examples are slightly different being react instead of view):
Describe the feature you would like to see added
Currently if a Toast is called with life like below:
toast.current.show({life: 5000, severity: 'error', summary: 'Error Message', detail: 'Validation failed'});
The Toast hides after the provided timeout no matter if its hovered.
There should be a prop to handle this behaviour lets say
pauseOnHover: <Boolean>
and there should be callbacks foronMouseEnter
andonMouseLeave
events.pauseOnHover: true (default: false) //Pause the toast timer until the notification is mouse hovered
Is your feature request related to a problem?
Yes, In case of errors, I show some error details like error code in toasts. Some of our customers don't do anything with it and some go to the notification to copy the error code but notifications hides in between that.
Making toast sticky is not a solution as users would have to manually click and close the notification. Not a good UX.
I can't increase time on the notification as most customers doesn't care about the toasts, but for some who do face this frustration of toast disappearing while they were copying the error code.
Describe the solution you'd like
There should be a prop to handle this behaviour let's say
pauseOnHover: <Boolean>(default: false)
and there should be callbacks foronMouseEnter
andonMouseLeave
events.pauseOnHover: true (default: false) //Pause the toast timer until the toast is mouse hovered
Puuuhhhhleeeeeasssseeeeeee!
Beta Was this translation helpful? Give feedback.
All reactions