Update the source variable instead of overwrite

Viewed 44

I have this method in VueJS 2:

methods: {
    buildFormModal(insurance_id) {
            insurance_company: {
                name: 'insurance_company',
                type: 'Multiselect',
                translateOptions: false,
                selected: this.customers.insurances[insurance_id].insurance_company.selected,
                options: this.customers.insurances[insurance_id].insurance_company.options
            }
        };
    },

Now through reactivity the "selected" key gets overwritten instead of updating the this.customers variable. To this.customers nothing happends/changes.

Is it possible to update the original variable instead of completely overwrite the selected key?

0 Answers
Related