Here is the fiddle https://fiddle.sencha.com/?fiddle=1ahm#fiddle/1ahm
Classic theme with nearly the same code works fine.
This is a sencha bug you should report in the official forum in a timely manner.
store.getRange()
can be called without start and end parameter. ("The starting index. Defaults to zero."/"The ending index. Defaults to the last record. The end index is included.")bufferedStore.getRange()
does not explicitly tell us it can be called without parameters, but we can safely assume it implicitly should, because it is overriding the function definition of the parent class. At least the Modern Grid assumes so.bufferedStore.getRange()
then calls the private function rangeCached
with start
and end
(which are both undefined)rangeCached
obviously expects these two to be numbers, or why else should they even use the strict equality operator at start === 0 ? 0 : start - 1
?If it were just this glitch, you could fix it with an override, something like:
Ext.define('MyBufferedStoreOverride',{
override:'Ext.data.BufferedStore',
getRange:function(start, end, options) {
if(!Ext.isNumber(start)) start = 0;
if(!Ext.isNumber(end)) end = this.getCount();
me.callOverridden([start, end, options]);
}
})
but I think that Sencha never tested their Modern Grid with a BufferedStore
, because once you got around that first bug, the next error will be thrown.