From 741c3f905afb3b471f1ca6d02f47c565447882a2 Mon Sep 17 00:00:00 2001 From: lubauss Date: Sat, 21 Feb 2026 19:52:02 +0100 Subject: [PATCH] fix: auto-generate unique IDs so multiple toasts display simultaneously The default toast ID was hardcoded to "sileo-default", meaning every toast without an explicit id shared the same identifier. Calling sileo.success() twice would replace the first toast instead of showing two separate notifications. Changed the fallback to use the existing generateId() helper, which produces unique IDs (counter + timestamp + random). Users who want the old "replace" behavior can still pass an explicit id. --- src/toast.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toast.tsx b/src/toast.tsx index 9256a98..02e59f0 100644 --- a/src/toast.tsx +++ b/src/toast.tsx @@ -131,7 +131,7 @@ const createToast = (options: InternalSileoOptions) => { const live = store.toasts.filter((t) => !t.exiting); const merged = mergeOptions(options); - const id = merged.id ?? "sileo-default"; + const id = merged.id ?? generateId(); const prev = live.find((t) => t.id === id); const item = buildSileoItem(merged, id, prev?.position);