diff --git a/core/src/views/GlobalSearch.vue b/core/src/views/GlobalSearch.vue index 2bca15ec905b4..24547fd627089 100644 --- a/core/src/views/GlobalSearch.vue +++ b/core/src/views/GlobalSearch.vue @@ -26,7 +26,7 @@ - + @@ -54,6 +54,9 @@ export default { toggleGlobalSearch() { this.showGlobalSearch = !this.showGlobalSearch }, + handleModalVisibilityChange(newVisibilityVal) { + this.showGlobalSearch = newVisibilityVal + }, }, } diff --git a/core/src/views/GlobalSearchModal.vue b/core/src/views/GlobalSearchModal.vue index 85e81a5a2c520..76fc921c821b4 100644 --- a/core/src/views/GlobalSearchModal.vue +++ b/core/src/views/GlobalSearchModal.vue @@ -2,7 +2,7 @@ @@ -200,6 +200,7 @@ export default { contacts: [], debouncedFind: debounce(this.find, 300), showDateRangeModal: false, + internalIsVisible: false, } }, @@ -224,12 +225,17 @@ export default { }, watch: { isVisible(value) { + this.internalIsVisible = value + }, + internalIsVisible(value) { + this.$emit('update:isVisible', value) this.$nextTick(() => { if (value) { this.focusInput() } }) }, + }, mounted() { getProviders().then((providers) => { @@ -519,7 +525,7 @@ export default { this.$refs.searchInput.$el.children[0].children[0].focus() }, closeModal() { - this.$refs.globalSearchModal.close() + this.internalIsVisible = false this.searchQuery = '' }, supportFiltering() {