Answer the question
In order to leave comments, you need to log in
How to save values in a modal tab if the tab has changed?
I wrote a modal window and it has several tabs, when I switch between them, the changes that were made in the tab are not saved. In the data of one of the tabs, I have an object that I use for v-model
data() {
generalInfo: { policyName: "", enableLink: false }
}
<v-switch
helpText="help text"
class="policy-editor-field policy-editor-field-switch"
label="Link to Datasources"
v-model="generalInfo.enableLink"
/>
watch: {
generalInfo: {
handler(val) {
if (val) {
this.setPolicyToEdit(val)
}
},
immediate: true,
deep: true
},
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question