radzen-blazor
radzen-blazor copied to clipboard
Pager OnPageSizeChanged method bug
Describe the bug When using the PageSizeOptions and you have a Count that is able to be shown all on one page and you switch to a page size that doesn't fit all the records on one page, the page number changes to the last page rather than staying on the first page as expected.
To Reproduce
- Create a blazor .net 6 project with all the default options, perform the initial Radzen set up and replace the contents of Index.razor with the below. @page "/"
<PageTitle>Index</PageTitle>
@code{
private List
- Change the page size from 10 to 2 and it will change the page number to 3 (last page)
Expected behavior I think the page index should not change from 0 when performing this action
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows
- Browser Edge
- Version 101
Additional context Having looked at the OnPageSizeChanged method - https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/RadzenPager.razor.cs
I think the if (isLastPage) check should change to if (isLastPage && !isFirstPage)
The same problem, despite the fact that I forcibly open the first page
@enchev It's been fixed in 4.7.2