From 43066e729aa4be9a12b70fc355912386b8716d9d Mon Sep 17 00:00:00 2001 From: "lilian.breton" Date: Sun, 18 Dec 2022 13:11:05 +0100 Subject: [PATCH] end of list part --- myBlazorApp/Minecraft.Crafting.Api/Data/inventory.json | 10 ++++------ myBlazorApp/myBlazorApp/Pages/Inventory.razor.cs | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/myBlazorApp/Minecraft.Crafting.Api/Data/inventory.json b/myBlazorApp/Minecraft.Crafting.Api/Data/inventory.json index a562add..559c0cc 100644 --- a/myBlazorApp/Minecraft.Crafting.Api/Data/inventory.json +++ b/myBlazorApp/Minecraft.Crafting.Api/Data/inventory.json @@ -4,9 +4,8 @@ "position": 1 }, { - "itemName": "lili", - "position": 2, - "number": 11 + "itemName": "null", + "position": 2 }, { "itemName": "null", @@ -37,9 +36,8 @@ "position": 9 }, { - "itemName": "lili", - "position": 10, - "number": 11 + "itemName": "null", + "position": 10 }, { "itemName": "null", diff --git a/myBlazorApp/myBlazorApp/Pages/Inventory.razor.cs b/myBlazorApp/myBlazorApp/Pages/Inventory.razor.cs index ceef206..63b6ae1 100644 --- a/myBlazorApp/myBlazorApp/Pages/Inventory.razor.cs +++ b/myBlazorApp/myBlazorApp/Pages/Inventory.razor.cs @@ -97,6 +97,7 @@ namespace myBlazorApp.Pages if (SearchText.IsNullOrEmpty()) { choix = items; + totalItem = items.Count(); NavigationManager.NavigateTo("inventory", false); } else @@ -106,8 +107,10 @@ namespace myBlazorApp.Pages pageSize = Filtered.Count() - (currentPage - 1) * 10; } choix = Filtered.GetRange((currentPage - 1) * 10, pageSize); + totalItem = Filtered.Count(); } StateHasChanged(); + NavigationManager.NavigateTo("inventory", false); return choix; }