Skip to content

Commit 1a1350e

Browse files
authored
Merge pull request #22863 from abpframework/AbpCrudPageBase
Fix pagination issue by adjusting current page on entity deletion
2 parents 537e438 + fc942f7 commit 1a1350e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,11 @@ protected virtual Task OnDeletingEntityAsync()
552552

553553
protected virtual async Task OnDeletedEntityAsync()
554554
{
555+
if (Entities.Count == 1 && CurrentPage > 1)
556+
{
557+
CurrentPage -= 1;
558+
}
559+
555560
await GetEntitiesAsync();
556561
await InvokeAsync(StateHasChanged);
557562
await Notify.Success(GetDeleteMessage());

0 commit comments

Comments
 (0)