-
20 Sep 2007 11:21 AM #1
[already on its way] Ext.View - deselect
[already on its way] Ext.View - deselect
Proposal to add method deselect to Ext.View.
My "hack" (a simple adaptation of select):
Code:Ext.apply(Ext.View.prototype, { deselect:function(nodeInfo, suppressEvent){ if(nodeInfo instanceof Array){ for(var i = 0, len = nodeInfo.length; i < len; i++){ this.deselect(nodeInfo[i], true); } } else{ var node = this.getNode(nodeInfo); if(node && this.isSelected(node)){ Ext.fly(node).removeClass(this.selectedClass); this.selections.remove(node); if(!suppressEvent){ this.fireEvent("selectionchange", this, this.selections); } } } } });
-
20 Sep 2007 11:25 AM #2
think Animal already suggested something similar a month or 2 ago.
try searching for "Ext.View unselect"
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
20 Sep 2007 11:35 AM #3
There is a deselect in my DDView I think.
-
20 Sep 2007 11:36 PM #4
Very much true: http://extjs.com/forum/showthread.ph....view+unselect
I just didn't think of unselect but deselect when searching on the forum.
-
22 Sep 2007 10:34 PM #5
Though... to be acting "to the letter of the law"
, there is no unselect, but deselect
http://dictionary.reference.com/browse/deselect - (verb) to remove from selection
http://dictionary.reference.com/browse/unselect - (adj) not select, excellent or suitable






Reply With Quote