Skip to content

Commit

Permalink
fix: remove use of v-model since it does not work on some devices
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Apr 28, 2021
1 parent 5aa1311 commit 799f73f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/pages/posts/navigation/search/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
autofocus
aria-label="Search for tags"
placeholder="Search: e.g. mario"
v-model="search.query"
:value="search.query"
@input="inputHandler"
@keypress.enter.prevent="inputEnterHandler"
/>
Expand Down Expand Up @@ -225,8 +225,12 @@ export default {
// #region Search bar
async inputHandler(event) {
const inputData = event.target.value
// Replace empty spaces with underscores
this.search.query = this.search.query.replace(/\s+/g, '_')
const replacedInputData = inputData.replace(/\s+/g, '_')
this.search.query = replacedInputData
if (this.search.query.length === 0) {
this.debouncedFetchSearchDataFromApi.cancel()
Expand Down

0 comments on commit 799f73f

Please sign in to comment.