From 2af3276cf6b584212f7bdee2a283f21e8388bc4c Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 31 Aug 2021 13:47:41 +0000 Subject: [PATCH] PMCORE-3262: filter popover is opened automatically in the first time --- resources/assets/js/components/search/CasesFilter.vue | 6 ++++-- resources/assets/js/home/Inbox/Inbox.vue | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/search/CasesFilter.vue b/resources/assets/js/components/search/CasesFilter.vue index e089a23f2..ee718e992 100644 --- a/resources/assets/js/components/search/CasesFilter.vue +++ b/resources/assets/js/components/search/CasesFilter.vue @@ -103,7 +103,7 @@ export default { searchLabel: this.$i18n.t("ID_SEARCH"), addSearchTitle: this.$i18n.t("ID_ADD_SEARCH_FILTER_CRITERIA"), searchTags: [], - + dataLoaded: false, filterItems: [ { type: "CaseNumber", @@ -206,6 +206,7 @@ export default { o.autoShow = false; }); this.setFilters(fils); + this.dataLoaded = true; } }, watch: { @@ -214,7 +215,8 @@ export default { handler(newVal, oldVal) { this.searchTags = []; this.selected = []; - if (newVal.length) { + //Prevent show popover at the first time + if (newVal.length && this.dataLoaded) { this.setFilters(newVal, oldVal); this.searchClickHandler(); } diff --git a/resources/assets/js/home/Inbox/Inbox.vue b/resources/assets/js/home/Inbox/Inbox.vue index 665856e55..bb5acf970 100644 --- a/resources/assets/js/home/Inbox/Inbox.vue +++ b/resources/assets/js/home/Inbox/Inbox.vue @@ -402,6 +402,7 @@ export default { * Initialize filters */ initFilters() { + debugger; let params; if (this.defaultOption) { params = utils.getAllUrlParams(this.defaultOption);