Skip to content

Commit

Permalink
fix: notice ui blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzgydi committed May 12, 2022
1 parent 31c6cbc commit d695656
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/base/base-notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit d695656

Please sign in to comment.