Table: disable filter when filters is an empty array (#11864)

This commit is contained in:
Jikkai Xiao 2018-07-05 11:03:52 +08:00 committed by GitHub
parent 899d70da93
commit b6eaaf6943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ export default {
fixed: this.fixed === '' ? true : this.fixed, fixed: this.fixed === '' ? true : this.fixed,
filterMethod: this.filterMethod, filterMethod: this.filterMethod,
filters: this.filters, filters: this.filters,
filterable: this.filters || this.filterMethod, filterable: this.filters && this.filters.length && this.filterMethod,
filterMultiple: this.filterMultiple, filterMultiple: this.filterMultiple,
filterOpened: false, filterOpened: false,
filteredValue: this.filteredValue || [], filteredValue: this.filteredValue || [],

View File

@ -339,7 +339,7 @@ export default {
handleHeaderClick(event, column) { handleHeaderClick(event, column) {
if (!column.filters && column.sortable) { if (!column.filters && column.sortable) {
this.handleSortClick(event, column); this.handleSortClick(event, column);
} else if (column.filters && !column.sortable) { } else if (column.filterable && !column.sortable) {
this.handleFilterClick(event, column); this.handleFilterClick(event, column);
} }