Results 1 to 10 of 12

Thread: Checkbox does not fire "change" event on the first change after setRawValue(true).

Threaded View

Previous Post Previous Post   Next Post Next Post
    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-10684 in 4.2.3.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    27
    Vote Rating
    0
      0  

    Default Checkbox does not fire "change" event on the first change after setRawValue(true).

    The problem appears is you use setRawValue() method. Method setValue() works fine.
    Before checkbox render just use component.setRawValue(true); and put some listener for "change" event. You'll see that for the first time when you uncheck the checkbox listener will not work.

    Sample project is in attachment. Thanks.

    *EDIT BY SLEMMON
    Steps:
    • Click the button => the checkbox gets checked
    • Click the checkbox

    Inline test case:
    Code:
    var checkbox;
    
    
    Ext.create("Ext.button.Button", {
        renderTo: Ext.getBody(),
        text: "setRawValue",
        handler: function () {
            checkbox.setRawValue(true);
        }
    });
    
    
    checkbox = Ext.create("Ext.form.field.Checkbox", {
        renderTo: Ext.getBody(),
        boxLabel: "Checkbox",
        listeners: {
            change: function () {
                console.log("change");
            }
        }
    });
    Attached Files Attached Files
    Last edited by slemmon; 16 Jul 2013 at 1:38 PM. Reason: additional test notes

Posting Permissions

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