diff --git a/MP.Stats/Components/DataPager.razor b/MP.Stats/Components/DataPager.razor
index eab20eca..6b407189 100644
--- a/MP.Stats/Components/DataPager.razor
+++ b/MP.Stats/Components/DataPager.razor
@@ -10,7 +10,7 @@
«
- @for (int i = 1; i <= LastPage; ++i)
+ @for (int i = @startPage; i <= endPage; ++i)
{
var pageNum = i;
@@ -57,6 +57,28 @@
reportChangePage();
}
+ private int numPages { get; set; } = 10;
+
+ // calcola un set 1..numPOages centrato sulla pagina corrente...
+ private int startPage
+ {
+ get
+ {
+ int answ = (int)(currPage / numPages) * numPages - 2;
+ answ = answ > 0 ? answ : 1;
+ return answ;
+ }
+ }
+ private int endPage
+ {
+ get
+ {
+ int answ = (int)(currPage / numPages) * numPages + numPages + 2;
+ answ = answ < LastPage ? answ : LastPage;
+ return answ;
+ }
+ }
+
private int LastPage
{
get