Prechádzať zdrojové kódy

fix: notice ui blocking

GyDi 3 rokov pred
rodič
commit
d695656b8c
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      src/components/base/base-notice.tsx

+ 3 - 1
src/components/base/base-notice.tsx

@@ -86,7 +86,9 @@ const Notice: NoticeInstance = (props) => {
 };
 
 (["info", "error", "success"] as const).forEach((type) => {
-  Notice[type] = (message, duration) => Notice({ type, message, duration });
+  Notice[type] = (message, duration) => {
+    setTimeout(() => Notice({ type, message, duration }), 0);
+  };
 });
 
 export default Notice;