PDA

View Full Version : [CLOSED] Configure CellEditing plugin using declarative syntax



pmanrubia
16 May 2014, 6:03 AM
Hi,

I get an error when trying to configure the cellEditing plugin this way:
viewConfig: {
plugins: {
ptype: 'cellediting',
clicksToEdit: 2
}
},


But, it works if you configure it this way:
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],

You can find both examples in the following fiddle: https://fiddle.sencha.com/#fiddle/5u5

Just comment / uncomment the code to run both scenarios.

Thanks

mitchellsimoens
16 May 2014, 6:10 AM
Thanks for the report! I have opened a bug in our bug tracker.

evant
21 May 2014, 6:40 AM
The test case is misconfigured.

2 things on the not working version:
1) The plugin is configured in the viewConfig, it should be on the grid.
2) The syntax should be an array of plugins.



Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [{
header: 'Name',
dataIndex: 'name',
editor: 'textfield'
}, {
header: 'Email',
dataIndex: 'email',
flex: 1,
editor: {
xtype: 'textfield',
allowBlank: false
}
}, {
header: 'Phone',
dataIndex: 'phone'
}],
selType: 'cellmodel',



plugins: [{
clicksToEdit: 1,
ptype: 'cellediting'
}],

height: 200,
width: 400,
renderTo: Ext.getBody()
});


Works correctly.