Closes advanced search shortcut after click in search

This commit is contained in:
weryques 2018-07-17 13:56:35 -03:00
parent 666bfa5870
commit c5f9705786
2 changed files with 17 additions and 9 deletions

View File

@ -412,6 +412,8 @@
searchAdvanced(){
if(this.isHeader){
this.$root.$emit('closeAdvancedSearchShortcut', true);
if(this.$route.path == '/items') {
this.$root.$emit('openAdvancedSearch', true);
}

View File

@ -32,6 +32,7 @@
<!--class="mdi mdi-magnify"/>-->
<!--</span>-->
<b-dropdown
ref="advancedSearchShortcut"
class="advanced-search-header-dropdown"
position="is-bottom-left">
<b-icon
@ -129,15 +130,20 @@
isMenuCompressed: false
},
created(){
this.fetchMetadata({
collectionId: false,
isRepositoryLevel: true,
isContextEdit: false,
includeDisabled: false,
})
.then((metadata) => {
this.metadata = metadata;
});
this.$root.$on('closeAdvancedSearchShortcut', (close) => {
this.$refs.advancedSearchShortcut.toggle();
});
this.fetchMetadata({
collectionId: false,
isRepositoryLevel: true,
isContextEdit: false,
includeDisabled: false,
})
.then((metadata) => {
this.metadata = metadata;
});
},
}
</script>