You found a bug! We've classified it as
EXTJS-26953
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Sencha User
DataView deselect bug in mode: 'multi'
Dear Support,
There is a bug in latest version ExtJS Moder 6.5.3.7
When you set selectable to
selectable: {
mode: 'multi',
deselectable: true
}
the 'select' event is fired, but when you deselect item the 'deselect' event does not fire at all.
Fiddle https://fiddle.sencha.com/#view/editor&fiddle/2fm2
With Kind Regards
Sebastian
-
Sencha - Support Team
Hello Sebastian,
Hope you are doing well and Thanks for keeping us posted. Much appreciated.
We will check this over and let you know at earliest.
Regards,
Joe.
-
Sencha - Support Team
Thanks for the report! I have opened a bug in our bug tracker.
-
Sencha Premium User

Originally Posted by
Jaraj
Thanks for the report! I have opened a bug in our bug tracker.
any ETA on this ?
-
Sencha Premium User
Still in 6.6.0
Any information or workaround?
And why there's no more the event "selectionchange" (inherits from Ext.mixin.Selectable)?
Now I have to listen to two events and one is not working.
EDIT:
The bug is found in Ext.dataview.selection.Model.selectWithEventMulti()
Code:
me[isSelected ? 'deselect' : 'select'](record, true);
This calls the functions select() and deselect() with the same parameters (record, true)
But deselect() hasn't the parameter keepExisting
Code:
select: function(records, keepExisting, suppressEvent)
deselect: function(records, suppressEvent)
So the workaround is:
Code:
if (isSelected) {
me.deselect(record);
} else {
me.select(record, true);
}