Fix Pager component issue which manifested itself in Event Log. This reverts a fix from #1160 and addresses the root problem.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
@namespace Oqtane.Modules.Controls
|
||||
@namespace Oqtane.Modules.Controls
|
||||
@inherits ModuleControlBase
|
||||
@typeparam TableItem
|
||||
|
||||
@ -114,10 +114,10 @@
|
||||
@code {
|
||||
private int _pages = 0;
|
||||
private int _page = 1;
|
||||
private int _maxItems;
|
||||
private int _maxPages;
|
||||
private int _startPage;
|
||||
private int _endPage;
|
||||
private int _maxItems = 10;
|
||||
private int _maxPages = 5;
|
||||
private int _startPage = 0;
|
||||
private int _endPage = 0;
|
||||
|
||||
[Parameter]
|
||||
public string Format { get; set; }
|
||||
@ -172,24 +172,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(PageSize))
|
||||
{
|
||||
_maxItems = 10;
|
||||
}
|
||||
else
|
||||
if (!string.IsNullOrEmpty(PageSize))
|
||||
{
|
||||
_maxItems = int.Parse(PageSize);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(DisplayPages))
|
||||
{
|
||||
_maxPages = 5;
|
||||
}
|
||||
else
|
||||
if (!string.IsNullOrEmpty(DisplayPages))
|
||||
{
|
||||
_maxPages = int.Parse(DisplayPages);
|
||||
}
|
||||
|
||||
_page = 1;
|
||||
_startPage = 0;
|
||||
_endPage = 0;
|
||||
|
||||
if (Items != null)
|
||||
{
|
||||
ItemList = Items.Skip((_page - 1) * _maxItems).Take(_maxItems);
|
||||
|
Reference in New Issue
Block a user