fix bug list

master
Lilian BRETON 3 years ago
parent a17035dfeb
commit 977b41ed00

@ -145,6 +145,10 @@ namespace myBlazorApp.Pages
Sorted = full; Sorted = full;
} }
Sorted.Sort((x, y) => string.Compare(x.DisplayName, y.DisplayName)); Sorted.Sort((x, y) => string.Compare(x.DisplayName, y.DisplayName));
if (Sorted.Count() < (currentPage - 1) * 10 + pageSize)
{
pageSize = Sorted.Count() - (currentPage - 1) * 10;
}
choix = Sorted.GetRange((currentPage - 1) * 10, pageSize); choix = Sorted.GetRange((currentPage - 1) * 10, pageSize);
} }
return choix; return choix;

Loading…
Cancel
Save