Threaded View
-
5 Dec 2012 9:01 AM #1
Checkboxgroup allowBlank:false and validitychange event not firing on first click
Checkboxgroup allowBlank:false and validitychange event not firing on first click
REQUIRED INFORMATIONExt version tested:
- Ext 4.1.3
- Chrome 24.0
- Safari 6.0.2
<!doctype html>
Description:- Neither checkboxgroup nor radiogroup seem to work properly with the allowBlank:false config. Specifically, they fail to fire the validitychange event when an option is first clicked, causing things like form-bound buttons to not respond properly. For the checkbox gorup, checking, unchecking, then rechecking an option will get the control responding as one would expect.
- Create a checkbox group with allowBlank:false and a form-bound button
- Note that button correctly starts disabled (as form is not valid)
- Check a box
- A validitychange event should fire indicating the form is now valid
- The button should enable as the form is now valid
- No event fires
- The button remains disabled.
- If you uncheck the same box, the event DOES fire, and the validation error is displayed
- Checking the same box once more, the event fires again, and the button is enabled
Code:{ xtype: 'form', items: [ { xtype: 'checkboxgroup', allowBlank: false, items: [ {boxLabel:'One', name:'test-item', inputValue:1}, {boxLabel:'Two', name:'test-item', inputValue:2}, {boxLabel:'Three', name:'test-item', inputValue:3} ] }, { xtype: 'button', text: 'Enabled When Valid', formBind: true } ], listeners: {validitychange:function(f,v){console.log('Validity changed to ' + v)}} }
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7918
in
4.2.0 Sprint 2.


Reply With Quote