Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
[up] treat select option value null as empty string
Browse files Browse the repository at this point in the history
so to keep the option as an empty value when used inside <promise-form> or similar. This is necessary to keep the syntax consistent with Vue 2. Also explained here vuejs/docs/issues/1295

(cherry picked from commit 5dd37788cd92d3d433db005f819563fa49ff05ea)
  • Loading branch information
phil294 committed Nov 11, 2021
1 parent 44b4f39 commit 8b2f0d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/FormField.vue
Expand Up @@ -5,9 +5,9 @@
select v-if="fielddata.options||fielddata.optgroups" :id=id v-model=model v-bind=bindable_fielddata
optgroup v-for="optgroup of fielddata.optgroups" :label=optgroup.label
/ kinda duplicate, not so pretty :-/
option v-for="option of optgroup.options" :value=option.value
option v-for="option of optgroup.options" :value="option.value || ''"
| {{ option.name || option.value }}
option v-for="option of fielddata.options" :value=option.value
option v-for="option of fielddata.options" :value="option.value || ''"
| {{ option.name || option.value }}
slot v-else=""
input :id=id v-model=model v-bind=bindable_fielddata onfocus=select()
Expand Down

0 comments on commit 8b2f0d7

Please sign in to comment.