PDA

View Full Version : [FIXED] [4.0.2] AbstractView.onItemDeselect



westy
16 Jun 2011, 12:38 AM
Hi,

Have had to put a guard in this method, since sometimes it appears that the node for a record is not found. Probably due to a reload of the tree happening or something.

Quite hard to reproduce, but it does happen, and I feel the defensive change is probably a good thing anyway.



/**
* Override to guard against the node not being found for the record.
* @param {Object} record The record that has been deselected.
*/
onItemDeselect: function(record) {
var node = this.getNode(record);

if (node) {
Ext.fly(node).removeCls(this.selectedItemCls);
}
}


Cheers,
Westy

westy
3 Aug 2011, 8:17 AM
Still present in 4.0.5, keeping override.

westy
18 Aug 2011, 1:21 AM
Bit of thread necromancy here... just got the same issue in onItemSelect, so adding the same defence to that one.

westy
31 Aug 2011, 7:13 AM
Both still there in 4.0.6

edspencer
31 Aug 2011, 6:27 PM
Ok I've added fixes for both to the 4.0.7 branch

westy
1 Sep 2011, 1:30 AM
Ok I've added fixes for both to the 4.0.7 branch

Excellent, thanks Ed!