Skip to content

Commit

Permalink
fix(mwan): clean form on save
Browse files Browse the repository at this point in the history
Field values where preserved across multiple edit/add actions
  • Loading branch information
gsanchietti committed Aug 6, 2024
1 parent cb6f422 commit a810764
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/standalone/multi-wan/RuleCreator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ function cleanForm() {
destinationAddress.value = ''
destinationPort.value = ''
validationErrors.value.clear()
sticky.value = false
srcType.value = 'any'
dstType.value = 'any'
srcObject.value = ''
dstObject.value = ''
}

type Payload = {
Expand Down Expand Up @@ -128,7 +133,10 @@ function save() {
error.value = reason
}
})
.finally(() => (saving.value = false))
.finally(() => {
saving.value = false
cleanForm()
})
}
}
</script>
Expand Down

0 comments on commit a810764

Please sign in to comment.