Merge pull request #160 from fileman/FixPagerAfterDeletePage

Fix for PageStart > EndPage after delete and don't reset value of Page
This commit is contained in:
Shaun Walker
2019-10-25 12:27:48 -04:00
committed by GitHub

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;