Hi guys,
We’ve noticed that AjaxStore fires load or loadPage depending on pageSize.
In most cases, we only need a single, generic load event to know when data has been fetched—regardless of paging.
In our large enterprise app, we’ve never needed to distinguish between paged and non-paged loads. Triggering load in all cases would be simpler, less confusing (especially when calling store.load()), more predictable, and consistent with Ext JS.
Otherwise we need to listen for both events and that would make the app more bloated and the tests bigger than needed, and we have hundreds of tests that listen for store load event.
const store = new AjaxStore(CountriesStore);
store.on({
load() {
// Fired when pageSize: 0
},
loadPage() {
// Fired when pageSize > 0
},
});
store.load();