Skip to content

Commit

Permalink
fixed the update bug of number textfield
Browse files Browse the repository at this point in the history
  • Loading branch information
ishubin committed Feb 10, 2025
1 parent af5bcab commit fe91746
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ui/components/NumberTextfield.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div v-if="name" class="label" ref="label" @click="onLabelClicked">{{name}}</div>
<div v-if="!name && icon" class="label" ref="icon"><i :class="icon"></i></div>
<div class="wrapper">
<input ref="textfield" type="text" v-model="text" @keydown.enter="submitEvent" :disabled="disabled"/>
<input ref="textfield" type="text" v-model="text" @keydown="delaySubmit" @keydown.enter="submitEvent" :disabled="disabled"/>

<div class="step-controls">
<span class="step step-up" @click="onStepClicked(1)" @mousedown="onMouseDownIncrement"><i class="fas fa-caret-up"></i></span>
Expand Down Expand Up @@ -100,7 +100,7 @@ export default {
}
},

delayEvent() {
delaySubmit() {
this.updateDelayer.delay();
},

Expand Down Expand Up @@ -190,10 +190,6 @@ export default {
},

watch: {
text() {
this.updateDelayer.delay();
},

value(newValue) {
this.text = numberToText(newValue);
}
Expand Down

0 comments on commit fe91746

Please sign in to comment.