PMCORE-3306: remove sendBy filter in draft list
remove debugger fix code style fix init filters fix advanced search
This commit is contained in:
@@ -376,16 +376,7 @@ export default {
|
||||
type: "normal",
|
||||
id: this.id
|
||||
});
|
||||
},
|
||||
filters: function (val) {
|
||||
this.$emit("updateSettings", {
|
||||
data: val,
|
||||
key: "filters",
|
||||
parent: this.page,
|
||||
type: "normal",
|
||||
id: this.id
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
/**
|
||||
@@ -621,8 +612,41 @@ export default {
|
||||
});
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
/**
|
||||
* Prepare the data to be updated
|
||||
* @param {object} data
|
||||
*/
|
||||
prepareAndUpdate(data) {
|
||||
let canUpdate = false,
|
||||
newFilters = [];
|
||||
data.params.forEach(item => {
|
||||
const container = {...item};
|
||||
container.autoShow = false;
|
||||
if (item.value !== "") {
|
||||
newFilters.push(container);
|
||||
canUpdate = true;
|
||||
}
|
||||
});
|
||||
if (data.params.length == 0) {
|
||||
canUpdate = true;
|
||||
}
|
||||
if (canUpdate) {
|
||||
this.$emit("updateSettings", {
|
||||
data: newFilters,
|
||||
key: "filters",
|
||||
parent: this.page,
|
||||
type: "normal",
|
||||
id: this.id
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Update event handler
|
||||
* @param {object} data
|
||||
*/
|
||||
onUpdateFilters(data) {
|
||||
this.filters = data.params;
|
||||
this.prepareAndUpdate(data);
|
||||
if (data.refresh) {
|
||||
this.$nextTick(() => {
|
||||
if (this.typeView === "GRID") {
|
||||
|
||||
Reference in New Issue
Block a user