Skip to content

Commit

Permalink
fix(ui): units in selects and selects always sending 0 (#925)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Mar 22, 2021
1 parent 035bd0d commit 6162933
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ValueId.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
:return-object="false"
:item-text="itemText"
item-value="value"
:suffix="value.unit"
:append-outer-icon="!disable_send ? 'send' : null"
v-model="value.newValue"
@click:append-outer="updateValue(value)"
Expand All @@ -143,6 +144,7 @@
:hint="help"
persistent-hint
chips
:suffix="value.unit"
:item-text="itemText"
item-value="value"
:type="value.type === 'number' ? 'number' : 'text'"
Expand Down Expand Up @@ -328,7 +330,10 @@ export default {
updateValue (v, customValue) {
// needed for on/off control to update the newValue
if (this.$refs.myCombo) {
if (
this.$refs.myCombo &&
this.$refs.myCombo.$refs.input._value !== null
) {
// trick used to send the value in combobox without the need to press enter
this.value.newValue = this.$refs.myCombo.$refs.input._value
}
Expand Down

0 comments on commit 6162933

Please sign in to comment.