更新时间:2022-01-04 06:21:24
您必须覆盖Ext.selection.RowModel
的onKeyPress
方法.出厂的实现是
You have to override the onKeyPress
method of the Ext.selection.RowModel
. The shipped implementation is
onKeyPress: function(e, t) {
if (e.getKey() === e.SPACE) {
e.stopEvent();
var me = this,
record = me.lastFocused;
if (record) {
if (me.isSelected(record)) {
me.doDeselect(record, false);
} else {
me.doSelect(record, true);
}
}
}
}
不幸的是,目前没有配置开关可以关闭该行为.
Unfortunately there currently is no configuration switch to turn off that behavior.