AnsweredAssumed Answered

OnChange backbone get the value before on change

Question asked by sidhu sidhu on Feb 6, 2017
Latest reply on Feb 7, 2017 by Angel Magana

Hi All,

 

            How can we get the value in the model before on change event.

({
extendsFrom: 'RecordView',
    initialize: function(options) {
        this._super('initialize', [options]);
        this.events['change [name=test]'] = 'change_test';

},

change_test: function(model){

console.log(this.model.get('test'));//this gives the value after we change the dropdown
//how do we get value before it was changed

},

})

 

Regards

Sidhu David López Mehul  Bhandari

Outcomes