diff --git a/panel/src/panel/notification.js b/panel/src/panel/notification.js index e487929b81..a118491a4f 100644 --- a/panel/src/panel/notification.js +++ b/panel/src/panel/notification.js @@ -174,6 +174,11 @@ export default (panel = {}) => { return this.success(notification); } + // add timeout if not error or fatal notification + if (notification.type !== "error" && notification.type !== "fatal") { + notification.timeout ??= 4000; + } + // set the new state this.set({ // add the current editing context @@ -211,7 +216,6 @@ export default (panel = {}) => { return this.open({ icon: "check", theme: "positive", - timeout: 4000, ...success }); },