-
26 Apr 2010 10:25 AM #1
[OPEN-905] Ext.ux.form.SpinnerField change event does not fire
[OPEN-905] Ext.ux.form.SpinnerField change event does not fire
If you look in the code, you will see that the onBlur function has been set to an empty function. As the result of that, the change() event which fires inside onBlur, in Ext.form.Field, never fires. It is not indicated why this was disabled.
Also, as a side effect, when you use the spinner to change the values of the field, change will never fire because internally the Spinner class uses Field.setRawValue() while the change event normally fires from onBlur.
I would suggest adding the change event functionality back in. Here is my code which still preserves that lack of functionality in onBlur. This code is based directly on Ext.form.Field class:
Code:onBlur: function(){ var v = this.getValue(); if(String(v) !== String(this.startValue)){ this.fireEvent('change', this, v, this.startValue); } }, setRawValue : function(v){ var newVal = Ext.ux.form.SpinnerField.superclass.setRawValue.call(this, v); var val = this.getValue(); if(String(val) !== String(this.startValue)){ this.fireEvent('change', this, val, this.startValue); } return(newVal); }
-
26 Apr 2010 10:27 AM #2
This has been noted back in November 2009 in the forums:
http://www.extjs.com/forum/showthrea...o-change-event
-
13 May 2010 12:51 PM #3
Is this going to be fixed in the future release?
-
18 May 2010 12:18 AM #4
I and I guess many of us, would appreciate this fix.
This component is very important for the kind of presentation I am creating and I really wonder why this is not part of the standard package.
-
23 Jul 2010 4:51 AM #5
just remove "onBlur: Ext.emptyFn," line from SpinnerField.js - it will then inherit original onBlur functionality from Ext.form.Field which works like a charm.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote