[Vuejs]-How do I change the state of the data inside an array in vue.js?

4👍

consider from your console image you attach, have you change your data variable like this:

var data = {
    id: this.currentUser.id,
    username: this.currentUser.username,
    email: this.currentUser.email,
    password: this.currentUser.password,
    roles: this.currentUser.roles,
    delYn: this.currentUser.delYn,
    productInfo: { 
       ...this.currentUser.productInfo,
       productUseYn: status
    }
};

technique above, we use spread operator. this is common usage in javascript for mutating an object.

👤DSPdav

Leave a comment