【发布时间】:2012-08-22 07:19:47
【问题描述】:
我有一个带有 RowEditor 插件的Ext.grid.Panel,它包含一个带有组合框编辑器的列:
{
dataIndex: 'parentId',
text: 'Parent category',
editor: {
store: store,
valueField: 'categoryId',
displayField: 'name',
xtype: 'combobox',
allowBlank: true
}
商店是这样的:
var store = Ext.create('Ext.data.Store', {
model: 'Category',
autoLoad: true,
proxy: {
type: 'rest',
url: 'api/categories',
reader: {
type: 'json',
root: 'categories'
}
}
});
和型号:
Ext.define('Neopod.model.Category', {
extend: 'Ext.data.Model',
fields: ['categoryId', 'name', 'parentId'],
})
当第一次编辑网格行并单击组合框时,ExtJS 会触发从服务器加载数据,并且 roweditor 会自动取消。所以用户希望看到组合下拉菜单,但组合没有打开,而是取消了编辑模式。
那么为什么 ExtJS 会这样呢?
【问题讨论】:
标签: javascript extjs extjs4