From 66a4d71babae6b8a546a3f9131226ab8df381730 Mon Sep 17 00:00:00 2001 From: mckaragoz <78308169+mckaragoz@users.noreply.github.com> Date: Thu, 1 May 2025 14:38:11 +0300 Subject: [PATCH] Animate Refresh Sensitivity --- .../Components/Animate/MudAnimate.razor | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CodeBeam.MudBlazor.Extensions/Components/Animate/MudAnimate.razor b/CodeBeam.MudBlazor.Extensions/Components/Animate/MudAnimate.razor index a45bf1bf..4c042ab4 100644 --- a/CodeBeam.MudBlazor.Extensions/Components/Animate/MudAnimate.razor +++ b/CodeBeam.MudBlazor.Extensions/Components/Animate/MudAnimate.razor @@ -104,15 +104,22 @@ [Category(CategoryTypes.Item.Appearance)] public string? KeyframeAdvanced { get; set; } + /// + /// The refresh delay in miliseconds. Higher value means stability between multiple refreshes. + /// + [Parameter] + [Category(CategoryTypes.Item.Appearance)] + public int RefreshSensitivity { get; set; } = 10; + bool _show = true; public async Task Refresh() { _show = false; - await Task.Delay(10); + await Task.Delay(RefreshSensitivity); await InvokeAsync(StateHasChanged); _show = true; - await Task.Delay(10); + await Task.Delay(RefreshSensitivity); await InvokeAsync(StateHasChanged); }