fix: search hint display no results found error when empty (#1255)

This commit is contained in:
NGPixel 2019-11-23 16:35:34 -05:00
parent f154f9cae5
commit 9e35126fc5

View File

@ -1,7 +1,7 @@
<template lang="pug"> <template lang="pug">
.search-results(v-if='searchIsFocused || (search && search.length > 1)') .search-results(v-if='searchIsFocused || (search && search.length > 1)')
.search-results-container .search-results-container
.search-results-help(v-if='search && search.length < 2') .search-results-help(v-if='!search || (search && search.length < 2)')
img(src='/svg/icon-search-alt.svg') img(src='/svg/icon-search-alt.svg')
.mt-4 {{$t('common:header.searchHint')}} .mt-4 {{$t('common:header.searchHint')}}
.search-results-loader(v-else-if='searchIsLoading && (!results || results.length < 1)') .search-results-loader(v-else-if='searchIsLoading && (!results || results.length < 1)')
@ -107,7 +107,6 @@ export default {
}, },
mounted() { mounted() {
this.$root.$on('searchMove', (dir) => { this.$root.$on('searchMove', (dir) => {
console.info()
this.cursor += ((dir === 'up') ? -1 : 1) this.cursor += ((dir === 'up') ? -1 : 1)
if (this.cursor < -1) { if (this.cursor < -1) {
this.cursor = -1 this.cursor = -1