vue v-model refactoring for mobile phones

This commit is contained in:
Burak Civan
2022-09-21 12:25:36 +03:00
parent e2490b9e60
commit f18f83b110
3 changed files with 16 additions and 10 deletions

View File

@ -16,8 +16,8 @@
autocapitalize="default"
autocorrect="ON"
:placeholder="placeholder"
v-model="search"
@input="onInput"
:value="search"
@input="onInput($event)"
:ref="'input-item-field-' + _uid"
@keydown.enter="inputEnterEvent"
/>
@ -282,7 +282,9 @@ export default {
}.bind(this), 100);
},
onInput() {
onInput(event) {
this.search = event.target.value;
this.isItemMatched = false;
//to optimize performance we kept the condition that checks for if search exists or not
if (!this.search) {