Extjs 编辑器:单击组合框,双击文本字段

Extjs 编辑器:单击组合框,双击文本字段,extjs,editor,Extjs,Editor,我有,那有: 我想实现以下场景:如果单击一个节点,编辑器应该是一个组合框,如果双击,编辑器应该是一个文本字段。我如何实现这一点 这是控制器的功能: getEditor: function (record) { if (dblclick) { Ext.create('Ext.grid.CellEditor', { field: Ext.widget('combo', { editable: false,

我有,那有:

我想实现以下场景:如果单击一个节点,编辑器应该是一个组合框,如果双击,编辑器应该是一个文本字段。我如何实现这一点

这是控制器的功能:

getEditor: function (record) {
    if (dblclick) {
        Ext.create('Ext.grid.CellEditor', {
            field: Ext.widget('combo', {
                editable: false,
                allowBlank: false,
                flex: 1,
                queryMode: 'local',
                store: App.store.Goods,
                displayField: 'name',
                valueField: 'id'
            })
        });
    };

    if (singleClick) {
        return Ext.create('Ext.grid.CellEditor', {
            field: Ext.widget('textfield', {
                selectOnFocus: true,
                maxLength: 20,
                enforceMaxLength: true
            })
        });
    }

    return;
},
getEditor: function (record) {
    if (dblclick) {
        Ext.create('Ext.grid.CellEditor', {
            field: Ext.widget('combo', {
                editable: false,
                allowBlank: false,
                flex: 1,
                queryMode: 'local',
                store: App.store.Goods,
                displayField: 'name',
                valueField: 'id'
            })
        });
    };

    if (singleClick) {
        return Ext.create('Ext.grid.CellEditor', {
            field: Ext.widget('textfield', {
                selectOnFocus: true,
                maxLength: 20,
                enforceMaxLength: true
            })
        });
    }

    return;
},