Skip to content

Commit

Permalink
update value normally if value is literally false (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote authored Apr 16, 2024
1 parent 327cff9 commit 275954e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/components/DynamicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export default {
},
methods: {
updateForm (fieldName, v) {
if (!v) {
if (v===false) {
// bool false value, leave it as is
this.$set(this.formData, fieldName, v)
} else if(!v) {
// empty value, remove it
this.$delete(this.formData, fieldName)
} else {
this.$set(this.formData, fieldName, v)
Expand Down

0 comments on commit 275954e

Please sign in to comment.