![](/img/trans.png)
[英]ExtJS 4 Cannot render values in combo inside grid (cell editor plugin)
[英]ExtJS grid with feature.Grouping and editing plugin.cellediting that has combo or tagfield will not close editor when click on groups
我正在使用带有“cellediting”插件和“分组”功能的 Ext.grid.Panel。 我的编辑器是一个标签域。 我开始编辑该字段,然后在关闭选择列表(边界列表)之前单击组标题(以触发模糊事件)
Sencha Fiddle 直播预览: https://fiddle.sencha.com/#view/editor&fiddle/3ll2
我当前的修复:
Ext.define("Ext.fix.grid.feature.Grouping", {
override: 'Ext.grid.feature.Grouping',
afterViewRender: function(view) {
// without callParent the problem is not reproduced,
// but colapse/expand is not working
this.callParent(arguments);
if (view.editingPlugin) {
view.on({
beforegroupclick: function(grid) {
view.editingPlugin.completeEdit();
}
})
}
}
});
问题似乎是在分组时焦点不会丢失在标签字段上。 试试这个解决方法:在你的网格中添加一个监听器:
listeners: {
groupclick: function (vw, node, group, e, opts) {
this.focus();
}
}
这将移除标记域上的焦点并强制它折叠。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.