Switch fires twice

dnadna
edited March 2018 in Technical questions

When clicking on a simple switch. The click event fires two times:

{ 
            view:       "switch", 
            label:      "Lifelog aktivieren", 
            labelWidth: 180,
            name:       "swLifeLog",
            width:      300,
            click: function() {
               console.log("test1");
               console.log("test2");
            }
},
Tagged:

Comments

  • edited March 2018

    Hello,

    Yep, it's a known issue and it is already fixed in the dev builld. The fix will be available as part of the next version.

    In the meantime, you can use the onChange event to stay on the safe side:

    view:"switch", on:{  
       onChange:function(newv, oldv){
           console.log(newv);
       }
    }
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion