From fc942f73b32cb473a48cc10f44c58fb63b3f6a9d Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Wed, 7 May 2025 10:25:47 +0800 Subject: [PATCH] Fix pagination issue by adjusting current page on entity deletion --- framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index 6f5c89a320..6c4fcf07f9 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -552,6 +552,11 @@ public abstract class AbpCrudPageBase< protected virtual async Task OnDeletedEntityAsync() { + if (Entities.Count == 1 && CurrentPage > 1) + { + CurrentPage -= 1; + } + await GetEntitiesAsync(); await InvokeAsync(StateHasChanged); await Notify.Success(GetDeleteMessage());