Skip to content

Commit 3dae972

Browse files
committed
Update form-text.js
1 parent bba54cf commit 3dae972

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/mixins/form-text.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,14 @@ export default {
129129
}
130130
return value
131131
},
132-
updateValue(value, lazy = false) {
132+
updateValue(value, force = false) {
133+
if (this.lazy && !force) {
134+
return
135+
}
133136
value = this.modifyValue(value)
134137
if (value !== this.vModelValue) {
135138
this.vModelValue = value
136-
if (!lazy) {
137-
this.$emit('update', value)
138-
}
139+
this.$emit('update', value)
139140
}
140141
},
141142
onInput(evt) {
@@ -155,7 +156,7 @@ export default {
155156
return
156157
}
157158
this.localValue = formattedValue
158-
this.updateValue(formattedValue, this.lazy)
159+
this.updateValue(formattedValue)
159160
this.$emit('input', formattedValue)
160161
},
161162
onChange(evt) {
@@ -175,7 +176,7 @@ export default {
175176
return
176177
}
177178
this.localValue = formattedValue
178-
this.updateValue(formattedValue, this.lazy)
179+
this.updateValue(formattedValue)
179180
this.$emit('change', formattedValue)
180181
},
181182
onBlur(evt) {
@@ -189,7 +190,7 @@ export default {
189190
this.localValue = this.stringifyValue(this.modifyValue(formattedValue))
190191
// We pass the formatted value here since the `updateValue` method
191192
// handles the modifies itself
192-
this.updateValue(formattedValue)
193+
this.updateValue(formattedValue, true)
193194
}
194195
// Emit native blur event
195196
this.$emit('blur', evt)

0 commit comments

Comments
 (0)