javascript - First tab panel does not show data in grid (IE 9) -
i have tab panel , every tab has grid in it, after loading, info in first tab missing displays fine in 2nd tab , working in browsers in extjs 4.2 not working in extjs 5.0 ie. ( working fine in chrome ) thee no errors on console. getting crazy issue. may bug in extjs 5. in advance.
//main panel class ext.define('myapp.view.myview', { extend: 'ext.tab.panel', alias : 'widget.myview', id : 'myview', autoscroll : true, activetab: 0, height: 600, layout: { type: 'column' }, requires : [ 'myview.view.firsttab', 'myview.view.secondtab' ], initcomponent : function() { this.items = [ { xtype: 'panel', id: 'ftab', autoscroll: true, items: [ { xtype: 'firsttab' }] }, { xtype: 'panel', id: 'stab', autoscroll: true, items: [ { xtype: 'secondtab' } ] } ]; this.callparent(arguments); } }); //controller var isactivietabset = false; // if store1 has info show first tab if(store1count > 0) { var tab0 = myview.down('#ftab'); tab0.tab.show(); if (!isactivietabset) { searchsummaryview.setactivetab(tab0); isactivietabset = true; } } else { myview.down('#ftab').tab.hide(); } //check if store2 has info if(store2count > 0) { var tab1 = myview.down('#stab'); tab1.tab.show(); if (!isactivietabset) { myview.setactivetab(tab1); isactivietabset = true; } } else { myview.down('#stab').tab.hide(); }
i see these issues code:
you should not set layout on tab panel. tab panel uses card layout internally, ignores passed layout if set it may confusing developers you set ids on components - unique in code posted may not true whole application. general rule not manually set ids - don't need them. you overnest - don't need wrap 'firsttab' in 'ftab'. seek utilize shallow containment chain possible. hiding tabs unusual. i'm not saying wouldn't work if need hide tab can utilize card layout simple switching logic. tab panel de-facto card layout tab "buttons" switch active card.otherwise code not give clue why should misbehave. suggest a) prepare above and, if not help b) prepare showcase @ https://fiddle.sencha.com can run , find real culprit.
javascript extjs extjs4.2 extjs5
No comments:
Post a Comment