Merge pull request #2634 from brkcvn/master

v-model refactoring for mobile phones on vue
This commit is contained in:
Burak Civan 2022-09-21 12:28:44 +03:00 committed by GitHub
commit d0f287563b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View File

@ -26,9 +26,9 @@
autocapitalize="default" autocorrect="ON"
:placeholder="placeholder"
:ref="'input-contact-field-' + _uid"
v-model="search"
@input="onInput"
@keyup.enter="onInput"
:value="search"
@input="onInput($event)"
@keyup.enter="onInput($event)"
/>
</div>
@ -304,7 +304,9 @@ export default {
});
},
onInput() {
onInput(event) {
this.search = event.target.value;
window.axios.get(this.searchRoute + '?search="' + this.search + '" enabled:1 limit:10')
.then(response => {
this.contact_list = [];

View File

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

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) {