Browse Source

Fix pagination issue by adjusting current page on entity deletion

pull/22863/head
maliming 1 year ago
parent
commit
fc942f73b3
  1. 5
      framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs

5
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());

Loading…
Cancel
Save