Таким образом, чтобы избежать магазин с
remoteSort: истинный
и
groupField
, чтобы быть автоматически загружены, я переопределил group
метод на 'Ext.data.AbstractStore'
/**
* Groups data inside the store.
* @param {String/Object} grouper Either a string name of one of the fields in this Store's
* configured {@link Ext.data.Model Model}, or an object, or a {@link Ext.util.Grouper grouper} configuration object.
* @param {String} [direction] The overall direction to group the data by. Defaults to the value of {@link #groupDir}.
*/
group: function(grouper, direction) {
var me = this,
sorters = me.getSorters(false),
change = grouper || (sorters && sorters.length)
if (grouper && typeof grouper === 'string') {
grouper = {
property: grouper,
direction: direction || me.getGroupDir()
};
}
me.settingGroups = true;
me.getData().setGrouper(grouper);
delete me.settingGroups;
if (change) {
if (me.getRemoteSort()) {
/**
* when grouping a store only if the store is loaded trigger a load otherwise
* the store would be autoloading.
*/
if(me.isLoaded()) {
me.load({
scope: me,
callback: me.fireGroupChange
});
}
} else {
me.fireEvent('datachanged', me);
me.fireEvent('refresh', me);
me.fireGroupChange();
}
}
// groupchange event must fire when group is cleared.
// The Grouping feature forces a view refresh when changed to a null grouper
else {
me.fireGroupChange();
}
},
});
Пожалуйста, сообщите об этом [на официальном форуме Sencha, в разделе ExtJS 6 Bugs] (https://www.sencha.com/forum/forumdisplay.php?134-Ext-6-Bugs). – Alexander
Спасибо за предложение, но я думаю, что это более широкая платформа, а также более активная. Мне хотелось бы, чтобы у Sencha была своя реализация, как Unity и некоторые другие. Http://answers.unity3d.com/questions/ –
Эта более широкая аудитория не исправляет ошибки ExtJS, только Sencha может это сделать. Достаточно. – Alexander