-
10 Mar 2011 1:24 AM #1
[FIXED] Ext.DataView.beforeselect not firing
[FIXED] Ext.DataView.beforeselect not firing
The documentation specifies the 'beforeselect' event, but it appears that this event is never triggered.
A quick look at Ext.DataView's source seems to confirm this: the event is indeed never fired.
Edit: Apparently, this has been mentioned before but no feedback was given.
-
16 Mar 2011 2:11 AM #2
NOT fixed
NOT fixed
Unfortunately, the bug was not resolved in PR4:
The "beforeselect" event is indeed now fired, but its return value is completely ignored. I don't want to be a , but it seems to me like that feature was implemented but never actually tested or even used...Code:onSelectChange: function(record, isSelected, suppressEvent) { var me = this, view = me.view, allowSelect = true, select; if (isSelected) { if (!suppressEvent) { select = me.fireEvent('beforeselect', me, record) !== false; } if (allowSelect) { view.onItemSelect(record); if (!suppressEvent) { me.fireEvent('select', me, record); } } } else { view.onItemDeselect(record); if (!suppressEvent) { me.fireEvent('deselect', me, record); } } }
-
16 Mar 2011 2:33 AM #3
Looks like I accidentally committed without saving:
Code:Ext.selection.DataViewModel.override({ onSelectChange: function(record, isSelected, suppressEvent) { var me = this, view = me.view, allowSelect = true; if (isSelected) { if (!suppressEvent) { allowSelect = me.fireEvent('beforeselect', me, record) !== false; } if (allowSelect) { view.onItemSelect(record); if (!suppressEvent) { me.fireEvent('select', me, record); } } } else { view.onItemDeselect(record); if (!suppressEvent) { me.fireEvent('deselect', me, record); } } } });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
16 Mar 2011 3:36 AM #4
Thanks a lot for the quick reply. It's very much appreciated!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[FIXED] DataView.beforeselect event is never actually fired
By jep in forum Sencha Touch 1.x: BugsReplies: 7Last Post: 20 Sep 2011, 8:09 AM -
[FIXED] Android Orientation Change Not Firing
By gcallaghan in forum Sencha Touch 1.x: BugsReplies: 2Last Post: 4 Nov 2010, 8:54 AM -
[FIXED-334] Proxy Event 'exception' Never Firing
By Shane F in forum Sencha Touch 1.x: BugsReplies: 5Last Post: 28 Sep 2010, 6:22 PM -
[FIXED-189] Store 'datachanged' even firing twice
By tobinharris in forum Sencha Touch 1.x: BugsReplies: 5Last Post: 3 Sep 2010, 11:38 PM -
[2.1][FIXED] DataView.getNodes() when called on an empty dataview
By Deramo in forum Ext 2.x: BugsReplies: 1Last Post: 31 May 2008, 8:59 AM


Reply With Quote