mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(toast): show animation when closing all modals (#5637)
* fix(toast): show animation when closing all modals * chore(changeset): add issue number --------- Co-authored-by: WK <wingkwong.code@gmail.com>
This commit is contained in:
parent
3ba7d29848
commit
afe2f977fc
5
.changeset/twelve-needles-bathe.md
Normal file
5
.changeset/twelve-needles-bathe.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@heroui/toast": patch
|
||||
---
|
||||
|
||||
show animation when closing all modals (#5620)
|
||||
@ -82,7 +82,9 @@ export const closeAll = () => {
|
||||
|
||||
const keys = globalToastQueue.visibleToasts.map((toast) => toast.key);
|
||||
|
||||
keys.map((key) => {
|
||||
globalToastQueue?.close(key);
|
||||
keys.forEach((key, index) => {
|
||||
setTimeout(() => {
|
||||
globalToastQueue?.close(key);
|
||||
}, index * 100);
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user