I wrote a Javascript method as follows:
function ServerSideDatasource(server) {
return {
getRows: function (params) {
var response = server.getData(params.request).then((res) => {
var result = {
success: true,
rows: res.rows,
lastRow: getLastRowIndex(params.request, res.rows),
};
});
}
This method is utilized in a TypeScript class:
var datasource = ServerSideDatasource(getFiltersFromGrid);
params.api.setServerSideDatasource(datasource);
Now, I need to figure out how to retrieve the number of rows from the ServerSideDatasource. Any suggestions?