Thanks @jako for your comment. I’ve checked my code, well, nothing special but I’ve extended it with everything I could find on page you provided…Unfortunately issue is the same.
It seems to me that the problem lies in a slightly different plane … perhaps there is something about updating the contents of the window, unique IDs or an enhanced update/reset of any data … look, I just call the window “refresh” / “close” several times for the same product. And each time different results in the lists.
The data always has time to load, my browser is also fast, the first list contains less than 100 entries (by the way, why can’t paging be more than 100, this is the maximum limit, then it still paginates, what parameter affects this,speech is about superselect #2 ?), Second is divided into two pages. .but as I said, at the next boot I can see how everything is and nothing.
Maybe after closing the window (and the data of the lists) it is necessary for it to do some kind of hard reset? Any ideas will be welcome.
First combo:
menus.combo.Locations = function (config) {
config = config || {};
Ext.applyIf(config, {
id: 'menus-combo-locations',
fieldLabel: _('locationmenu_' + config.name || 'locationmenu'),
fields: ['id', 'pagetitle', 'parents'],
valueField: 'id',
displayField: 'pagetitle',
name: 'location_id',
pageSize: 60,
hiddenName: 'location_id',
allowBlank: false,
url: menus.config['connector_url'],
baseParams: {
action: 'mgr/locationmenu/getlocation',
combo: true,
id: config.value
},
tpl: new Ext.XTemplate('\
<tpl for=".">\
<div class="x-combo-list-item minishop2-product-list-item" ext:qtip="{pagetitle}">\
<tpl if="parents">\
<span class="parents">\
<tpl for="parents">\
<nobr><small>{pagetitle} / </small></nobr>\
</tpl>\
</span><br/>\
</tpl>\
<span><small>({id})</small> <b>{pagetitle}</b></span>\
</div>\
</tpl>', {compiled: true}
),
pageSize: 60,
emptyText: _('locationmenu_empty_list'),
editable: false,
});
menus.combo.Locations.superclass.constructor.call(this, config);
};
Second combo:
menus.combo.Submenus2 = function(config, getStore) {
config = config || {};
Ext.applyIf(config, {
xtype: 'superboxselect',
name: 'categories',
fieldLabel: config['name'] || 'categories',
hiddenName: config['name'] || 'categories',
originalName: config['name'] || 'categories',
displayField: 'name',
valueField: 'id',
pageSize: 100,
paging:false,
store: new Ext.data.JsonStore({
url: menus.config['connector_url'],
baseParams: {
action: 'mgr/category/getlist',
},
root: 'results',
totalProperty: 'total',
autoLoad: true,
autoSave: false,
fields: ['id', 'name'],
value: '{categories}',
}),
minChars: 2,
editable: true,
resizable: true,
typeAhead: false,
allowBlank: true,
forceFormValue: false,
allowAddNewData: true,
addNewDataOnBlur: true,
forceSameValueQuery: true,
triggerAction: 'all',
anchor: '100%',
extraItemCls: 'x-tag',
clearBtnCls: 'x-form-trigger',
expandBtnCls: 'x-form-trigger',
listEmptyText: '<div style="padding: 7px;">No results...</div>',
tpl: new Ext.XTemplate('\
<tpl for="."><div class="x-combo-list-item">\
<span>\
{name}\
</span>\
</div></tpl>',
{compiled: true}
),
});
items.windows.js
{
xtype: 'menus-combo-options',
fieldLabel: _('menus_locationmenu_locations'),
name: 'locations',
id: config.id + '-locations',
anchor: '99%',
allowBlank: true,
allowAddNewData: true,
pageSize: 60,
handler: function () {
},
listeners: {
'change': {
fn: function (combo, a, b) {
var cmp = Ext.getCmp(config['id'] + '-categories');
if (!!cmp) {
console.log(combo.getValue());
cmp.getStore().baseParams['locations[]'] = combo.getValue();
cmp.store.removeAll();
cmp.store.load();
cmp.reset();
cmp.setValue('');
}
},
scope: this,
},
},
},
{
xtype: 'menus-combo-submenus2',
fieldLabel: 'Submenus',
name: 'categories',
id: config.id + '-categories',
anchor: '100%',
allowBlank: true,
emptyText: 'Please select locations first',
}