function overridePlugin() {
Ext.override(Ext.grid.plugin.CellEditing, {
startEdit: function (record, columnHeader) {
var me = this,
value = record.get(columnHeader.dataIndex),
context = me.getEditingContext(record, columnHeader),
ed;
record = context.record;
columnHeader = context.column;
me.completeEdit();
context.originalValue = context.value = value;
if (me.beforeEdit(context) === false || me.fireEvent('beforeedit', context) === false || context.cancel) {
return false;
}
if (columnHeader && (!columnHeader.getEditor || !columnHeader.getEditor(record))) {
return false;
}
ed = me.getEditor(record, columnHeader);
if (ed) {
me.context = context;
me.setActiveEditor(ed);
me.setActiveRecord(record);
me.setActiveColumn(columnHeader);
me.editTask.delay(15, ed.startEdit, ed, [me.getCell(record, columnHeader), value]);
} else {
me.grid.getView().getEl(columnHeader).focus((Ext.isWebKit || Ext.isIE) ? 10 : false);
}
return true;
}
});
}
解决Plugin和Checkbox组合时 双击checkbox报错的问题
最新推荐文章于 2022-06-06 10:23:20 发布