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(){ searchAdvanced(){
if(this.isHeader){ if(this.isHeader){
this.$root.$emit('closeAdvancedSearchShortcut', true);
if(this.$route.path == '/items') { if(this.$route.path == '/items') {
this.$root.$emit('openAdvancedSearch', true); this.$root.$emit('openAdvancedSearch', true);
} }

View File

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