I have a loop that outputs checkboxes:
<div v-for="(value, key) in optionsObject" :key="key">
In computed I check whether the prop options is an object or an array (if array I make they key from the array values)...
computed: {
optionsObject() {
return _.isPlainObject(this.options) ? this.options : _.zipObject(this.options, this.options);
}
}
But everytime the checkbox is changed, it runs the computed optionsObject again. Is there anyway to prevent this?