Reputation: 21565
I was following the toturial and sources published on this page: https://www.ag-grid.com/javascript-grid-virtual-paging/index.php
In my component I have the related code:
class PortsGrid extends React.Component {
constructor(props) {
console.log("PortsGrid - constructor");
super(props);
this.gridOptions = {
rowModelType: 'virtual',
// other options ...
}
}
onGridReady(
this.api = params.api;
this.columnApi = params.columnApi;
this.api.setDatasource(this._createDatasource());
}
In the datasource in the method getRows(params)
I call params.successCallback()
. The rows are then visible in the grid but no matter how I scroll the getRows
is not invoked again.
What am I missing?
Upvotes: 2
Views: 3188
Reputation: 21565
If you want to continue scrolling the lastRowIndex
in params.successCallback(rowsThisPage, lastRowIndex)
must resolve to -1
.
Upvotes: 4