Browse Source
Merge pull request #22863 from abpframework/AbpCrudPageBase
Fix pagination issue by adjusting current page on entity deletion
pull/22868/head
oykuermann
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
0 deletions
-
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()); |
|
|
|
|