Now the search in header realy search in repository

This commit is contained in:
weryques 2018-07-03 11:04:25 -03:00
parent 956791e405
commit 6ca0229b15
1 changed files with 14 additions and 5 deletions

View File

@ -26,10 +26,10 @@
:value="searchQuery" :value="searchQuery"
@input="futureSearchQuery = $event.target.value" @input="futureSearchQuery = $event.target.value"
@keyup.enter="updateSearch()"> @keyup.enter="updateSearch()">
<span <span class="icon is-right">
@click="updateSearch()" <i
class="icon is-right"> @click="updateSearch()"
<i class="mdi mdi-magnify" /> class="mdi mdi-magnify" />
</span> </span>
</div> </div>
<a @click="toItemsPage">{{ $i18n.get('advanced_search') }}</a> <a @click="toItemsPage">{{ $i18n.get('advanced_search') }}</a>
@ -65,6 +65,14 @@ export default {
}); });
}, },
updateSearch() { updateSearch() {
console.log(this.$route);
if(this.$route.path != '/items') {
this.$router.push({
path: '/items',
});
}
this.$eventBusSearch.setSearchQuery(this.futureSearchQuery); this.$eventBusSearch.setSearchQuery(this.futureSearchQuery);
}, },
}, },
@ -116,7 +124,7 @@ export default {
} }
.level-right { .level-right {
padding-right: 12px; padding-right: 12px;
a{ a {
color: white; color: white;
} }
.search-area { .search-area {
@ -143,6 +151,7 @@ export default {
cursor: pointer; cursor: pointer;
height: 27px; height: 27px;
font-size: 18px; font-size: 18px;
width: auto !important;
} }
} }