这发生在 extjs 版本 6.2+ 上。我有一个单元编辑插件,它在编辑时有一个监听器事件。当调用 onEdit 时,我正在尝试检查已编辑单元格的 xtype,但它失败了,因为活动列作为空值传递。这适用于早期版本。根据研究,这可能是一个从未在 extjs 版本中得到修复的错误,并且还没有看到任何解决方法。如果有人遇到这种情况,请指教。
问题:在单元格编辑中,editor.activecolumn 为空。它适用于早期版本。看起来 ExtJs 6.2 CellEditing 插件 editor.el.dom 总是传递 null。
面板布局:
hideHeaders: false,
sortableColumns: false,
rowLines: true,
collapsible: false,
titleCollapse: true,
layout: 'auto',
title: 'Test Page',
selModel: 'cellmodel',
plugins: {
ptype: 'cellediting',
clicksToEdit: 1,
listeners: {
beforeedit: 'isEditable',
edit: 'onEdit'
}
}
上面的代码将触发 onEdit,下面是函数:
onEdit: function(editor, c, e) {
// combobox check
if (editor.activeColumn.config.editor.xtype === 'combo') {
console.log("it's combo");
}
}