Skip to content
Snippets Groups Projects
Commit 215fdfaa authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Merge branch 'preserve-choices-types' into 'master'

preserve choices value types

Closes #959

See merge request !1238
parents f0388cc2 a560e307
No related branches found
No related tags found
1 merge request!1238preserve choices value types
<template>
<span class="select">
<select v-on:input="$emit('input', $event.target.value)">
<option
v-for="option in field.choices"
:value="option"
:key="option"
>
<select v-model="selected">
<option v-for="option in field.choices" :value="option" :key="option">
{{ option }}
</option>
</select>
......@@ -23,6 +19,16 @@ export default {
type: [String, Number],
required: true
}
},
computed: {
selected: {
get () {
return this.value
},
set (value) {
this.$emit('input', value)
}
}
}
}
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment