Skip to content

Commit

Permalink
Fix empty submit in activity title
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Feb 3, 2024
1 parent 3cf5689 commit 837d3f5
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions frontend/src/components/form/api/ApiWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,20 @@ export default {
},
},
watch: {
apiValue: function (newValue) {
// override local value if it wasn't dirty
if (!this.dirty || this.overrideDirty) {
this.localValue = newValue
this.parsedLocalValue = this.parse ? this.parse(newValue) : newValue
}
apiValue: {
handler: function (newValue) {
// override local value if it wasn't dirty
if (!this.dirty || this.overrideDirty) {
this.localValue = newValue
this.parsedLocalValue = this.parse ? this.parse(newValue) : newValue
}
// clear dirty if outside value changes to same as local value (e.g. after save operation)
if (this.parsedLocalValue === newValue) {
this.dirty = false
}
// clear dirty if outside value changes to same as local value (e.g. after save operation)
if (this.parsedLocalValue === newValue) {
this.dirty = false
}
},
immediate: true,
},
},
created() {
Expand Down

0 comments on commit 837d3f5

Please sign in to comment.