When CheckboxSelectionModel's Mode is set to Single, it's possible to deselect the row by clicking on it and by clicking on the row's checker

But when CheckboxSelectionModel's Mode is set to Multi, it's not possible to deselect the row by clicking on it


It would be possible to fix it by adding the following clause at the end Ext.selection.Model.selectWithEventMulti



Code:



else {
me.doDeselect(record);
}

So we would have the following:


Code:



selectWithEventMulti: function (record, e, isSelected) {
debugger;
var me = this,
shift = e.shiftKey,
ctrl = e.ctrlKey,
start = shift ? (me.getSelectionStart()) : null,
selected = me.getSelection(),
len = selected.length,
toDeselect, i, item;
if (shift && start) {
me.selectRange(start, record, ctrl);
} else if (ctrl && isSelected) {
if (me.allowDeselect) {
me.doDeselect(record, false);
}
} else if (ctrl) {
me.doSelect(record, true, false);
} else if (isSelected && !shift && !ctrl && len > 1) {
if (me.allowDeselect) {
toDeselect = [];
for (i = 0; i < len; ++i) {
item = selected[i];
if (item !== record) {
toDeselect.push(item);
}
}
me.doDeselect(toDeselect);
}
} else if (!isSelected) {
me.doSelect(record, false);
}
else {
me.doDeselect(record);
}
}