Checkboxgroup allowBlank:false and validitychange event not firing on first click
REQUIRED INFORMATIONExt version tested:Browser versions tested against:DOCTYPE tested against:
<!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.
Steps to reproduce the problem:- 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
The result that was expected:- A validitychange event should fire indicating the form is now valid
- The button should enable as the form is now valid
The result that occurs instead:- 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
Test Case:
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)}}
}