Merge pull request #13 from oqtane/master

sync with upstream
This commit is contained in:
Shaun Walker 2019-10-25 14:19:56 -04:00 committed by GitHub
commit d5031a052a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@
@code {
int Pages = 0;
int Page;
int Page = 1;
int MaxItems;
int MaxPages;
int StartPage;
@ -85,7 +85,6 @@
{
MaxPages = int.Parse(DisplayPages);
}
Page = 1;
if (Items != null)
{
@ -106,8 +105,16 @@
public void SetPagerSize(string direction)
{
if (direction == "forward")
{
if (EndPage + 1 < Pages)
{
StartPage = EndPage + 1;
}
else
{
StartPage = 1;
}
if (EndPage + MaxPages < Pages)
{
EndPage = StartPage + MaxPages - 1;