end of list part

master
Lilian BRETON 2 years ago
parent e8584747ff
commit 43066e729a

@ -4,9 +4,8 @@
"position": 1 "position": 1
}, },
{ {
"itemName": "lili", "itemName": "null",
"position": 2, "position": 2
"number": 11
}, },
{ {
"itemName": "null", "itemName": "null",
@ -37,9 +36,8 @@
"position": 9 "position": 9
}, },
{ {
"itemName": "lili", "itemName": "null",
"position": 10, "position": 10
"number": 11
}, },
{ {
"itemName": "null", "itemName": "null",

@ -97,6 +97,7 @@ namespace myBlazorApp.Pages
if (SearchText.IsNullOrEmpty()) if (SearchText.IsNullOrEmpty())
{ {
choix = items; choix = items;
totalItem = items.Count();
NavigationManager.NavigateTo("inventory", false); NavigationManager.NavigateTo("inventory", false);
} }
else else
@ -106,8 +107,10 @@ namespace myBlazorApp.Pages
pageSize = Filtered.Count() - (currentPage - 1) * 10; pageSize = Filtered.Count() - (currentPage - 1) * 10;
} }
choix = Filtered.GetRange((currentPage - 1) * 10, pageSize); choix = Filtered.GetRange((currentPage - 1) * 10, pageSize);
totalItem = Filtered.Count();
} }
StateHasChanged(); StateHasChanged();
NavigationManager.NavigateTo("inventory", false);
return choix; return choix;
} }

Loading…
Cancel
Save