New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error infinite scrolling when change cache block size #2202
Comments
I'm getting a similar bug with ag-grid react. After the first time changing the cache block size, other changes to it are ignored. I even tried giving the containing div a completely different id, expecting that react will then identify the grid as a completely new one, but it still uses the old cache block size. Also turning off pagination completely seems to be ignored if I had it enabled in the beginning (I want to have an "all" option in my page size drop-down). EDIT: paginationAutoPageSize also does not refresh. Sigh. |
I was able to change the // Force new cache block size by resetting internal cache
this.gridOptions.api.gridOptionsWrapper.setProperty('cacheBlockSize', pageSize);
this.gridOptions.api.infinitePageRowModel.resetCache();
// After that, update the pageSize through the api
this.gridOptions.api.paginationSetPageSize(pageSize); The downside is that the previous cache is lost. |
Hi, These properties are not meant to be changed dynamically, as @hugobaes mentions this can be somehow workaround it by resetting the cache. I am going to close this ticket since I think we won't be looking at making this properties dynamic Thanks |
Even though ticket is closed, but it still appears as first result in Google. Looking at code of
|
@Klinton90 I am not sure how you use @hugobaes @makinggoodsoftware Perhaps this can be re-considered to be implemented? When the default export function wants to be used, it only exports the rows that are loaded. When one wants to export all data then the user would need to scroll down until the last item. Changing the |
@Ruud-cb you should still be able to call private fields in typescript if you cast to any (i.e something like this): const api: any = this.gridOptions.api;
api.infinitePageRowModel.resetCache(); |
I remember I had to call the internal method As @makinggoodsoftware said, they are not meant to be changed dynamically, so it is a workaround using private api. |
@hugobaes what do you mean a private api? im trying this in angular and typescript but it won't work... |
Here is all logic that I have:
Component:
@BerghuisPeter |
I'm submitting a ... (check one with "x")
Current behavior
I uses pagination infinite scrolling follow link: https://www.ag-grid.com/javascript-grid-infinite-scrolling/#pagination.
When I change cacheBlockSize, paginationSetPageSize() to new pageSize.
But It not working, it still use old pageSize.
Expected behavior
After changing cacheBlockSize then grid paging to new pageSize.
Minimal reproduction of the problem with instructions
https://plnkr.co/edit/W7IlWNczaBdTVVBydW3r?p=preview
ag-Grid version: v16.0.0
The text was updated successfully, but these errors were encountered: