webix.DataDriver.productsAdapter = webix.extend({
getRecords: function (data) {
return data.Products;
},
getInfo: function (data) {
var info = {}
info._size = data.ItemsCount;
info._from = (data.Page - 1) * data.ItemsPerPage;
return info;
}
}, webix.DataDriver.json);
I’ve tied to use this productsAdapter in datatable, But paging not work. I’m shure that back-end can give back more items.
I started investigation issue and found a workaround.
I looked what webix.DataDriver.json returns → {Q: 0, R: 0, S: 0, T: undefined, U: undefined}
so i modified my getInfo this way
getInfo: function (data) {
var info = {}
info.Q = data.ItemsCount;
info.R = (data.Page - 1) * data.ItemsPerPage;
return info;
}
and paging start working.
Actually may be I use DataAdapter incorrectly? If no so probably it is a bug.