Reputation: 10802
I have a tree panel defined like this:
Ext.define('FilesEditor.view.FilesEditorNavigTree',{
extend:'Ext.tree.Panel',
....
columns:[{
xtype:'treecolumn',
header:'test',
dataIndex:'text',
editor:{
xtype:'textfield'
}
I guess I'm doing something wrong, since nothing happens when I click on tree nodes. Or it is possible, that I should first require somewhere some plugin. BTW. I would rather have this possibility to edit nodes on doubleclick and have a listener for this event.
Upvotes: 0
Views: 261
Reputation: 10802
The solution was to use a Ext.grid.plugin.CellEditing
inside initComponent of the tree panel. So, I did it like this:
Ext.define('FilesEditor.view.FilesEditorNavigTree',{
extend:'Ext.tree.Panel',
...
initComponent:function(){
var cellediting = Ext.create('Ext.grid.plugin.CellEditing',{
clicksToEdit:2
});
this.plugins = [];
this.plugins.push(cellediting);
this.columns = [{
xtype:'treecolumn',
header:'test',
dataIndex:'text',
editor:{
xtype:'textfield'
},....];
this.callParent(arguments);
Upvotes: 2