In ExtJS 6.2.0. I have a standard grid. The grid's selection model, and all of it's related functions like the highlighting of grid rows, is by default triggered by the single click event.
I would like to keep all of the selection model's functionality, but driven by a double click event instead.
I was thinking along the line of killing the default single click event listener, and introducing a dedicated double click event listener. But I can't find any handle on this default event listener.
Any suggestions?
0
votes
There isn't options for it. You need to override base functions.
– norbeq
@norbeq: I was afraid of that. Thanks for the confirmation.
– Xermit
1 Answers
-1
votes
Use clicksToEdit property in grid plugins as follow
Ext.define('Test.MyGrid', {
extend:'Ext.grid.Panel',
store: store,
xtype:'myGrid',
plugins: {
rowediting: {
clicksToEdit: 2,
autoCancel: false
}
},
columns: [
{ text: 'Name', dataIndex: 'name',editor:{
allowBlank: false
} },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
]
});
Check working example https://fiddle.sencha.com/#view/editor&fiddle/2ma9