Is toast action/close intentionally designed to not resume? #2221
-
I was wondering why the components It maintains the state of paused for new upcoming toasts which imo might not be the ideal behavior as it will require user interaction to resume toasts automatically again. What do you think? Should this be filed as a bug? To reproduce we can use official docs: https://www.radix-ui.com/docs/primitives/components/toast#close
This can also be reproduced on other libraries/design systems that uses Radix internally |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@gdfreitas This issue is happening because when you click the dismiss/close button, it changes the primitives/packages/react/toast/src/Toast.tsx Line 538 in eca6bab I opened a PR to fix this and another similar issue with resetting the |
Beta Was this translation helpful? Give feedback.
@gdfreitas This issue is happening because when you click the dismiss/close button, it changes the
context.isClosePausedRef
current value totrue
, so when you create a new Toast, it does not reset its value tofalse
and this verification doesn't trigger thestartTimer
function to dismiss the Toast automatically.primitives/packages/react/toast/src/Toast.tsx
Line 538 in eca6bab
I opened a PR to fix this and another similar issue with resetting the
ref
current values.