PMCORE-3262: filter popover is opened automatically in the first time

This commit is contained in:
Rodrigo Quelca
2021-08-31 13:47:41 +00:00
parent 6f8897cb14
commit 2af3276cf6
2 changed files with 5 additions and 2 deletions

View File

@@ -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();
}

View File

@@ -402,6 +402,7 @@ export default {
* Initialize filters
*/
initFilters() {
debugger;
let params;
if (this.defaultOption) {
params = utils.getAllUrlParams(this.defaultOption);