extjs datefilter question
In extjs GridFilters.js, we have :
onStateChange : function (event, filter) {
....开发者_开发技巧..
...
if ((this.autoReload || this.local) && !this.applyingState) {
//alert('Firing reload');
this.deferredUpdate.delay(this.updateBuffer);
}
}
I thought this means that whenever the
`this.deferredUpdate.delay(this.updateBuffer);`
was executed, the reload
function would be called. But by putting alerts, I discover that this is not the case. reload is called only once as it should be) despite the
alert('Firing reload');
popping up multiple times. I am using a Date Filter for this example.
Why is this so? does not a call to deferredUpdate.delay
automatically trigger the reload as per the GridFfilters.js class?
The GridFilter is using Ext's DelayedTask delay method (here) which cancels any pending delayed methods and queues a new one. Hence you are getting multiple alerts, but only one refresh.
精彩评论