If you setup a deliteful/PageableList based on an array, and the user pages to the end of the array, he gets an exception.
It's from this code in ArrayToStoreAdapter.js:
fetchRange: function (args) {
var res = this.data.slice(args.start, args.end);
if (res.length < (args.end - args.start)) {
var promise;
var evt = {start: args.start, end: args.end, resLength: res.length, setPromise: function (pro) {
promise = pro;
}};
this.emit("_new-query-asked", evt);
return promise;
} else {
return Promise.resolve(res);
}
},
The "_new-query-asked" event cause delite/Store to fire a "new-query-asked" event (without the underscore), but if no one is listening for that event then fetchRange() returns undefined rather than a Promise (with the remaining data) like it should.
If you setup a deliteful/PageableList based on an array, and the user pages to the end of the array, he gets an exception.
It's from this code in ArrayToStoreAdapter.js:
The "_new-query-asked" event cause delite/Store to fire a "new-query-asked" event (without the underscore), but if no one is listening for that event then
fetchRange()
returns undefined rather than a Promise (with the remaining data) like it should.cc @harbalk