extjs - extjs 树形面板单元格编辑
问题描述
我正在使用 ext 版本 6.5.3。经典的海王星。我有一个带有 cellediting 插件的树形面板,并提供 clicksToEdit 为 1。现在,如果我在树形面板上应用过滤器并单击要编辑的单元格,则需要单击 1 次。但是,如果我单击下一个单元格,则需要单击 2 次才能变为可编辑。请找到以下示例
Ext.create({
"xtype": "container",
renderTo: Ext.getBody(),
"items": [{
"xtype": "treepanel",
"id": "tp",
store: Ext.create('Ext.data.TreeStore', {
fields: ['Brand', 'Price'],
root: {
children: [{
Brand: 'Brand1',
Price: '8M'
}, {
Brand: 'Brand2',
Price: '8M'
}, {
Brand: 'Brand3',
Price: '10M'
}]
}
}),
"rootVisible": false,
"columns": [{
"xtype": "treecolumn",
"dataIndex": 'Brand',
"editor": true,
"text": "Brands"
}, {
"xtype": "treecolumn",
"dataIndex": "Price",
"text": "Value",
"editor": true,
}],
"plugins": [{
"ptype": "cellediting",
"clicksToEdit": 1
}]
}, {
xtype: 'button',
text: 'Add Filter',
handler: function () {
Ext.getCmp('tp').getStore().addFilter({
property: 'Price',
value: '8M'
})
}
}, {
xtype: 'button',
text: 'Clear Filter',
handler: function () {
Ext.getCmp('tp').getStore().clearFilter();
}
}]
});
- 点击“添加过滤器”按钮。
- 单击一个单元格并编辑该单元格(不要按 Enter)。
- 单击要编辑的下一个单元格(此处需要单击 2 次才能使单元格变为可编辑)。
- 单击“清除过滤器”按钮以删除过滤器并执行相同的步骤。(此处第二个单元格将在单击后变为可编辑)
第 3 步的预期结果,单元格应在第一次单击时变为可编辑。这适用于版本“6.0.1”并正在打破“6.5.3”。
有没有可用的解决方法?
解决方案
推荐阅读
- php - 注意:未定义索引:注册(尝试制作注册表时出错?)
- javascript - 这种方法似乎破坏了我的 react-native 代码
- image-processing - 使用不同格式的文档的最佳 OCR 方法以查找特定信息
- android - 如何根据特定条件在recyclerview中除一行之外的所有行的inActive或禁用onClick?
- android - RN:不兼容的 Android 库
- reactjs - 如何在日期格式的字段中写入日期?
- kotlin - 如何在“kotlin”中从一个活动过渡到另一个活动,例如从左到右和从右到左?
- python - URL 模板标签在一个实例中有效,但在另一个实例中找不到带有 '{'pk': ''}' 的 kwargs 的路径
- wcf - Biztalk WCF 服务发布向导
- cardano - 用户是否因在 Ouroboros 算法中竞标错误的分叉而受到惩罚?