Thank you for reporting this bug. We will make it our priority to review this report.
Buffered Store: Redundant loading of datastore when filtering and remoteSort is true
Buffered Store: Redundant loading of datastore when filtering and remoteSort is true
I have come across a bug when filtering a buffered store that results in two requests to load the same set of data. I am currently running ext version 5.1.0.50. This is due to the filter method calling this.callParent(arguments) twice when this.remoteSort is true. Below, is the filter method from ext/packages/sencha-core/src/data/BufferedStore.js:
Code:
filter: function() {
// For a buffered Store, we have to clear the page cache because the dataset will change upon filtering.
// Then we must prefetch the new page 1, and when that arrives, reload the visible part of the Store
// via the guaranteedrange event
if (this.remoteSort) {
this.getData().clear();
this.callParent(arguments);
}
//<debug>
else {
Ext.Error.raise('Local filtering may not be used on a buffered store - the store is a map of remote data');
}
//</debug>
this.callParent(arguments);
},
This is what it should be:Code:
filter: function() {
// For a buffered Store, we have to clear the page cache because the dataset will change upon filtering.
// Then we must prefetch the new page 1, and when that arrives, reload the visible part of the Store
// via the guaranteedrange event
if (this.remoteSort) {
this.getData().clear();
}
//<debug>
else {
Ext.Error.raise('Local filtering may not be used on a buffered store - the store is a map of remote data');
}
//</debug>
this.callParent(arguments);
},
Buffered Store: Redundant loading of datastore when filtering and remoteSort is true
Aucun commentaire:
Enregistrer un commentaire