From 7524e40f40716d8e686b7f7c5347b4f8b916f428 Mon Sep 17 00:00:00 2001 From: zxyao Date: Thu, 24 Aug 2023 22:33:00 +0800 Subject: [PATCH] fix(module: notification): change sync statehaschanged to async (#3400) --- components/notification/Notification.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/notification/Notification.razor.cs b/components/notification/Notification.razor.cs index 2dd953b6..7e0c710b 100644 --- a/components/notification/Notification.razor.cs +++ b/components/notification/Notification.razor.cs @@ -228,7 +228,7 @@ namespace AntDesign if (option.AnimationClass == AnimationType.Enter) { option.AnimationClass = AnimationType.Leave; - StateHasChanged(); + await InvokeStateHasChangedAsync(); option.InvokeOnClose(); @@ -245,7 +245,7 @@ namespace AntDesign } //when next notification item fade out or add new notice item, item will toggle StateHasChanged - StateHasChanged(); + await InvokeStateHasChangedAsync(); } //return Task.CompletedTask;