Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: radiogroup change event fired twice

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    229

    Default radiogroup change event fired twice

    Hi all,
    Radiogroup fires the change event twice when we click on a radio button.
    Cheers,
    C.

    items: {
    layout: 'anchor',
    items: [{
    xtype: 'radiogroup',
    fieldLabel:'radiogroup',
    items: [
    {boxLabel: 'Item 1', name: 'rb-col', inputValue: 1},
    {boxLabel: 'Item 2', name: 'rb-col', inputValue: 2, checked: true},
    {boxLabel: 'Item 3', name: 'rb-col', inputValue: 4},
    ],
    listeners: {
    change: function() {console.info('change', this, arguments)}
    }
    }]
    }

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    6

    Default

    I have a similar problem ...
    hopefully prompt how to solve it.

  3. #3
    Sencha Premium User
    Join Date
    Apr 2011
    Posts
    126

    Default

    I am also running into this. Does anyone have a solution? Mine is defined like this:
    Code:
            
    listeners: {
            change: function(theField, newValue, oldValue) {
                    var combo = Ext.getCmp('myCombo');
                    if(newValue == "1")
                    {
                        combo.disable();
                    }
                    else
                    {
                        combo.enable();
                    }
           }
    }

  4. #4
    Ext JS Premium Member
    Join Date
    Jun 2009
    Posts
    5

    Default

    same problem over here...

  5. #5
    Sencha User
    Join Date
    Jun 2010
    Posts
    6

    Default

    fyi, i found a temporary solution - using "dirtychange" event...

  6. #6
    Sencha User
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    59

    Default

    Problem still exists. 'dirtychange' is not a suitable solution. Any fix for this?

  7. #7
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    46

    Default

    Same issue here. Using Ext JS 4.0.2a

  8. #8
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    229

    Default

    Bump...

  9. #9
    Sencha User
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    59

    Default

    In my case I recognized, that the newValue values differ on both events. The first event delivers an array with the old and new value while the second delivers the new value. So I did something like that to only use the event once :
    Code:
    if (radiogroup.getChecked()[0] && !Ext.isArray(newValue.filter)) {
    //code goes here
     }
    In my case filter is the name attribute of all underlying radio elements. This helped me to process the event only once. Maybe this helps until it will be fixed.

  10. #10
    Sencha User
    Join Date
    Nov 2008
    Location
    Lyon, France
    Posts
    229

    Default

    Thanks for the answer. I do smth similar - it' s just that it is a bit dirty and should be corrected in the code base ; )
    Cheers
    C.

Page 1 of 2 12 LastLast

Similar Threads

  1. [BUG 3.1.x] RadioGroup as GridEditor: blur event not fired
    By franck34 in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 11 Aug 2011, 8:44 AM
  2. Combobox change event not fired at TabPanel
    By htammen in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 16 Dec 2010, 3:36 AM
  3. Radiogroup change event fired set to false - Shouldn't be!
    By catapult in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 22 Feb 2010, 6:45 AM
  4. Replies: 2
    Last Post: 17 Jun 2009, 7:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •