Browse Source
Merge pull request #22007 from magicjar/dev
Fix Pagination Previous Button Behavior
pull/22072/head
maliming
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
4 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs
|
|
|
@ -106,11 +106,11 @@ public class AbpPaginationTagHelperService : AbpTagHelperService<AbpPaginationTa |
|
|
|
protected virtual async Task<string> GetPreviousButtonAsync(TagHelperContext context, TagHelperOutput output) |
|
|
|
{ |
|
|
|
var localizationKey = "PagerPrevious"; |
|
|
|
var currentPage = TagHelper.Model.CurrentPage == 1 |
|
|
|
? TagHelper.Model.CurrentPage.ToString() |
|
|
|
: (TagHelper.Model.CurrentPage - 1).ToString(); |
|
|
|
var currentPage = TagHelper.Model.CurrentPage > 1 |
|
|
|
? (TagHelper.Model.CurrentPage - 1).ToString() |
|
|
|
: "1"; |
|
|
|
return |
|
|
|
"<li class=\"page-item " + (TagHelper.Model.CurrentPage == 1 ? "disabled" : "") + "\">\r\n" + |
|
|
|
"<li class=\"page-item " + (TagHelper.Model.CurrentPage <= 1 ? "disabled" : "") + "\">\r\n" + |
|
|
|
(await RenderAnchorTagHelperLinkHtmlAsync(context, output, currentPage, localizationKey)) + " </li>"; |
|
|
|
} |
|
|
|
|
|
|
|
|