Skip to content
Snippets Groups Projects
Commit 22006f26 authored by schneider210's avatar schneider210
Browse files

refactor: only render resultlist on match; not by default

parent 4f6752cc
No related branches found
No related tags found
1 merge request!56no-search-result
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
{{ total }} {{ total === 1 ? 'Result' : 'Results' }} {{ total }} {{ total === 1 ? 'Result' : 'Results' }}
</p> </p>
<SearchResultList :query="query" :items="items" /> <SearchResultList
v-if="total > 0 && query"
:items="items"
:query="query"
/>
<div <div
class="text-center" class="text-center"
...@@ -37,11 +41,11 @@ export default { ...@@ -37,11 +41,11 @@ export default {
}, },
data() { data() {
return { return {
query: '',
items: [], items: [],
page: 1,
query: '',
size: 20, size: 20,
total: 0, total: 0,
page: 1,
} }
}, },
watch:{ watch:{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment