Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7918 in 4.2.0.265.
  1. #1
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    78
    Vote Rating
    1
    anselmtmcclain is on a distinguished road

      0  

    Question 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
    Browser versions tested against:
    • Chrome 24.0
    • Safari 6.0.2
    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)}}
                }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,812
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1

Tags for this Thread