When you click on the left grid, two grids are reloaded which are located in the TabPanel. On the active tab, the widget appears, but not on the inactive tab. It appears again if you reload on the paginator or add a new line to the grid.

Maybe someone knows the possible reasons. Or how to update the widget column when switching tabs.

Ext.define('SOM.JS.view.SearchAttributeViewModel_grid', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.SearchAttributeViewModel_grid', formulas: { //current searchAttr is bound to automatically published selection currentSearchAttr: { bind: '{grdSearchAttribute.selection}', get: function(searchAttr){ var rec; if(Ext.isArray(searchAttr)){ rec = searchAttr[0]; } else { rec = searchAttr; } this.set('current.searchAttr', rec); return rec; } } }, stores: { storeSearchAttribute: { model: 'SOM.JS.model.SearchAttributeModel', sorters: { property: 'SORDER', direction: 'ASC' }, remoteSort: true, listeners: { datachanged: 'onDataChanged', beforeload: 'onBeforeLoad', scope: 'controller' }, searchParams: { Config_Id: {bindTo: 'currentObject.ObjectRec.ID'} } } } }); Ext.define('SOM.JS.view.SearchAttributeView_grid', { extend: 'EcxUtils5.BaseClass.GridView', alias: 'widget.SearchAttributeView_grid', viewModel: { type: 'SearchAttributeViewModel_grid' }, bind: { store: '{storeSearchAttribute}', selection: '{current.searchAttr}' }, selModel: { mode: 'SINGLE' }, reference: 'grdSearchAttribute', id: 'IDgrdSearchAttribute', dockedItems: [ { xtype: 'toolbar', dock: 'top', cls: 'Ecx MainActionTlbr', items: [ { xtype: 'button', reference: 'btnAddSearchAttribute', text: 'New Attribute', icon: EcxUtils.Form.getIconURL('add'), handler: 'onActionNew' } ] } ], columns: [ { xtype: 'widgetcolumn', menuDisabled: true, id: 'idWidgSearch', width: 50, widget: { //defaultBindProperty: null, xtype: 'container', items: [ { xtype: 'button', icon: EcxUtils.Form.getIconURL('cog'), menu: { xtype: 'menu', items: [{text:'TEMP'}], listeners: { activate: 'onMenuActivate', scope: 'controller' } } } ] } }, { menuDisabled: true, sortable: false, xtype: 'actioncolumn', width: 45, align: 'center', items: [ { icon: EcxUtils.Form.getIconURL('arrow_up'), tooltip: 'Order Up', command: 'UP', handler: 'directOrder' }, { icon: EcxUtils.Form.getIconURL('arrow_down'), tooltip: 'Order Down', command: 'DOWN', handler: 'directOrder' } ] }, { text: 'Id', dataIndex: 'ID', width: 60, hidden: true } /// ] }); 

enter image description here After reload

  • As I understand it, widgetcolumn id = 'idWidgSearch'. Perhaps there is another element with such an id that may be causing a bug. In ExtJS for components, the id field is better not to use at all. - ki11en
  • id = 'idWidgSearch' is a variation of attempts to solve a bug. Initially id was not. - Vlad
  • Can I link to fiddle with an example? - ki11en

1 answer 1

Hung up on tabChange, listeners.

 grid.getView().refresh();