Refetch reference record when related field value changes
This commit is contained in:
parent
cb2328ec74
commit
0bf54d0ce4
@ -213,6 +213,20 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
'record.values': {
|
||||
deep: true,
|
||||
handler (newValues = {}) {
|
||||
if (this.options.referenceField) {
|
||||
const { recordID: oldValue } = this.referenceRecord || {}
|
||||
const newValue = newValues[this.options.referenceField]
|
||||
|
||||
if (oldValue !== newValue) {
|
||||
this.loadRecord(this.referenceModule)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
beforeDestroy () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user