choice input datatype detection
This commit is contained in:
parent
ecffe30062
commit
1758aebb73
@ -25,6 +25,12 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.new_value = this.value
|
this.new_value = this.value
|
||||||
|
|
||||||
|
if (this.new_value === "") { // if the selection is empty but the options are of type number, set to 0 instead of ""
|
||||||
|
if (typeof this.options[0]['value'] === 'number') {
|
||||||
|
this.new_value = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
new_value: function () {
|
new_value: function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user