-
15 Sep 2011 10:51 PM #1
Instantiating grids at the wrong time causes scroll bars to silently disappear
Instantiating grids at the wrong time causes scroll bars to silently disappear
I'm not sure if this is 1) a bug, 2) missing diagnostics, 3) a documentation problem or 4) a case of PEBKAC, but I found this behavior highly surprising. It took me a whole day to figure out what was going on. Code:
This creates two identical grids, but one has scroll bars and the other doesn't. No errors are generated.Code:var data1 = [] for(var i = 0; i<20; i++) data1.push([i]) function mkgrid() { return Ext.create('Ext.grid.Panel', { store: Ext.create('Ext.data.ArrayStore', { fields: [{name: 'X'}], data: data1 }), columns: [{text: 'X', dataIndex: 'X', flex: 1}], height: 150, width: 150 })}; var grid1 = mkgrid() Ext.application({ launch: function() { Ext.create('Ext.container.Viewport', { items: [grid1, mkgrid()], autoScroll:true }) } });
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-4044
in
4.0.7.


Reply With Quote