Possible bug in SfDataPager changing rows per page
Hi everyone!
There seems to be a problem with changing the number of rows per page depending on the number of elements in the data source.
How to reproduce the error:
- Take the SyncFusion example of SfDatagrid paging.
- Change the _rowsPerPage variable and give it a value of 25.
- Change the number of elements in the data source. Replace 300 by 35.
- Change the possible values of the availableRowsPerPage property of the SfDataPager to [25, 50, 100].
- Change the pageCount property of the SfDataPager to (orderInfoDataSource.orders.length / _rowsPerPage).ceilToDouble().
Once these changes are made, the way to reproduce the problem is to navigate to the second page where the last 10 items are displayed, change to view 50 items per page and what happens is:
I also attach the example file with the modifications applied.
By the way, is it better to put this post here in the forum or in the feedback portal? where is it better to put it?
Greetings
Attachment: datagrid_paging_599693be.zip
Hi Fernando,
We have investigated this case on our end and encountered the same issue you
have described. Considering this, we have logged a bug report in our feedback
portal. We will fix the reported issue and include the changes in our weekly
patch release, which is expected to be rolled out on February 20, 2024. We will
let you know once it is published. We appreciate your patience and
understanding until then. You can also track the status of the bug using the
feedback link below.
Feedback Link: https://www.syncfusion.com/feedback/50399/the-datapager-did-not-function-correctly-when-updating-the-rows-per-page-at
Regards,
Tamilarasan
Disclaimer: Inclusion of this solution in the weekly release may change due to
other factors including but not limited to QA checks and works
reprioritization.
Fernando,
We are glad to inform you that the reported issue regarding the “The DataPager
did not function correctly when updating the rows per page at runtime” has been
resolved. This fix has been incorporated into our latest weekly patch release.
To benefit from this fix, we recommend updating your DataGrid package to
version 24.2.7.
https://pub.dev/packages/syncfusion_flutter_datagrid
Root Cause of the issue:
The issue arises from the DataPager failing to properly update the current page when rowsPerPage changed at runtime, leading to this discrepancy.
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.
Regards,
Tamilarasan
- 2 Replies
- 2 Participants
-
FD Fernando de Miguel
- Jan 29, 2024 10:08 AM UTC
- Feb 21, 2024 02:11 PM UTC