Notes
ExtJS Version: 6.2.1.167
Fiddle: fiddle.sencha.com/#view/editor&fiddle/1tlt
This function worked in ExtJS 2.x and there were no problems.
<h / ">
purpose
To have a grid (with a grouping function and a cell editing plugin) that can have several different editors ( textfieldand combos) in one column.
The grid has changed the traditional table system so that field names and record values ββare displayed vertically. An example table header is shown here:
+
- Field Names - Record 1 Values - Record 2 Values - Editable Column
+
We cannot use the traditional system because there are hundreds of fields, but only a few entries for comparison.
<h / ">
Code
Here is the fiddle
Here is the main code that allows me to use several editors:
Ext.define('MemberCellEditing', {
extend: 'Ext.grid.plugin.CellEditing',
xtype: 'membercellediting',
alias: 'plugin.membercellediting',
getCachedEditor: function(editorId, record, column) {
var me = this,
editors = me.editors,
dropDownName = record.get('dropDown');
if (dropDownName && dropDownName != 'N') editorId = dropDownName;
var editor = editors.getByKey(editorId);
if (!editor) {
if (dropDownName && dropDownName != 'N') {
var combo = DropDownManager.getCombo(editorId);
editor = Ext.create('Ext.grid.CellEditor', {
editorId: editorId,
field: combo,
floating: true
});
} else {
editor = column.getEditor(record);
}
if (!editor) {
return false;
}
if (!(editor instanceof Ext.grid.CellEditor)) {
editor = new Ext.grid.CellEditor(Ext.apply({
floating: true,
editorId: editorId,
field: editor
}, editor.editorCfg));
}
editor.field.excludeForm = true;
if (editor.column !== column) {
editor.column = column;
column.on('removed', me.onColumnRemoved, me);
}
editors.add(editor);
}
editor.ownerCmp = me.grid.ownerGrid;
if (column.isTreeColumn) {
editor.isForTree = column.isTreeColumn;
editor.addCls(Ext.baseCSSPrefix + 'tree-cell-editor');
}
editor.setGrid(me.grid);
editor.editingPlugin = me;
return editor;
}
});
Run codeHide result<h / ">
Question
, "" . , .
# 1
style undefined

# 2
parentNode undefined null reference

, el , , , dom.
</" >
, . . , - / , , , .. , , , . 30 .
, , , - el . , , el .
, .
Update
, , . :
https://www.sencha.com/forum/showthread.php?330959-ExtJs-6-2-CellEditing-plugin-editor-el-dom-is-null
: EXTJS-23330
Sencha Support, , .
# 2
6.0.2 6.5.
, :
- A 5 . A.
- ( 1, ) 5 .
- ( 1, ).
- 5 , A.
- 3 , B.
- 10 , A.
- 3 , A.
- ( 1, ) 3 .
- ( 1, 2 ) 3 .
- ( 1, 2 ).
(, 6.5):
100%, , .