Skip to content

Commit

Permalink
#655 for TreeTable
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Nov 25, 2020
1 parent 0bf8075 commit 835ad45
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/treetable/TreeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export default {
}
//global
if (this.hasGlobalFilter && !globalMatch) {
if (this.hasGlobalFilter() && !globalMatch) {
let copyNodeForGlobal = {...copyNode};
let filterValue = this.filters['global'];
let filterConstraint = FilterUtils['contains'];
Expand All @@ -590,7 +590,7 @@ export default {
}
let matches = localMatch;
if (this.hasGlobalFilter) {
if (this.hasGlobalFilter()) {
matches = localMatch && globalMatch;
}
Expand Down Expand Up @@ -646,7 +646,7 @@ export default {
},
createLazyLoadEvent(event) {
let filterMatchModes;
if (this.hasFilters) {
if (this.hasFilters()) {
filterMatchModes = {};
this.columns.forEach(col => {
if (col.props?.field) {
Expand Down Expand Up @@ -777,6 +777,12 @@ export default {
}
return false;
},
hasFilters() {
return this.filters && Object.keys(this.filters).length > 0 && this.filters.constructor === Object;
},
hasGlobalFilter() {
return this.filters && Object.prototype.hasOwnProperty.call(this.filters, 'global');
}
},
computed: {
Expand Down Expand Up @@ -816,7 +822,7 @@ export default {
data = this.sortMultiple(data);
}
if (this.hasFilters) {
if (this.hasFilters()) {
data = this.filter(data);
}
Expand Down Expand Up @@ -857,12 +863,6 @@ export default {
return hasFooter;
},
hasFilters() {
return this.filters && Object.keys(this.filters).length > 0 && this.filters.constructor === Object;
},
hasGlobalFilter() {
return this.filters && Object.prototype.hasOwnProperty.call(this.filters, 'global');
},
paginatorTop() {
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');
},
Expand Down

0 comments on commit 835ad45

Please sign in to comment.