Why does 'on change' fire when record view is loaded?

I must be missing something...

Why do on change events fire when the record view is loaded before that field is indeed changed?

How can I stop the execution of an on change until the field is actually changed?

thanks,
Francesca
Parents
  • Hi All,

    @Varun Nath: This works.

    Another approach is:

    When I tried console.log(this.model.previous('<attr>')), it returns undefined which will execute the condition !_.isEqual(), so I tried this:

    if(typeof this.model.get('<attr>') !== "undefined") { // function call }
    So, now we have hand full of options to try ;)
Reply
  • Hi All,

    @Varun Nath: This works.

    Another approach is:

    When I tried console.log(this.model.previous('<attr>')), it returns undefined which will execute the condition !_.isEqual(), so I tried this:

    if(typeof this.model.get('<attr>') !== "undefined") { // function call }
    So, now we have hand full of options to try ;)
Children
No Data