Fix user search not updating instantly on Android

This commit is contained in:
Pavel Djundik 2018-08-28 16:26:41 +03:00 committed by Pavel Djundik
parent 7c8441a93b
commit 140c14959c

View File

@ -5,12 +5,13 @@
<div class="count"> <div class="count">
<input <input
ref="input" ref="input"
v-model="userSearchInput" :value="userSearchInput"
:placeholder="channel.users.length + ' user' + (channel.users.length === 1 ? '' : 's')" :placeholder="channel.users.length + ' user' + (channel.users.length === 1 ? '' : 's')"
type="search" type="search"
class="search" class="search"
aria-label="Search among the user list" aria-label="Search among the user list"
tabindex="-1" tabindex="-1"
@input="setUserSearchInput"
@keydown.up="navigateUserList(-1)" @keydown.up="navigateUserList(-1)"
@keydown.down="navigateUserList(1)" @keydown.down="navigateUserList(1)"
@keydown.page-up="navigateUserList(-10)" @keydown.page-up="navigateUserList(-10)"
@ -114,6 +115,9 @@ export default {
}, },
}, },
methods: { methods: {
setUserSearchInput(e) {
this.userSearchInput = e.target.value;
},
getModeClass(mode) { getModeClass(mode) {
return modes[mode]; return modes[mode];
}, },