Commit d184e9c0 authored by Liril's avatar Liril Committed by 杨奕

Table: Add silent for filter-chagne

parent d652e73f
...@@ -146,7 +146,7 @@ TableStore.prototype.mutations = { ...@@ -146,7 +146,7 @@ TableStore.prototype.mutations = {
}, },
filterChange(states, options) { filterChange(states, options) {
let { column, values } = options; let { column, values, silent } = options;
if (values && !Array.isArray(values)) { if (values && !Array.isArray(values)) {
values = [values]; values = [values];
} }
...@@ -175,7 +175,9 @@ TableStore.prototype.mutations = { ...@@ -175,7 +175,9 @@ TableStore.prototype.mutations = {
states.filteredData = data; states.filteredData = data;
states.data = sortData(data, states); states.data = sortData(data, states);
this.table.$emit('filter-change', filters); if (!silent) {
this.table.$emit('filter-change', filters);
}
Vue.nextTick(() => this.table.updateScrollY()); Vue.nextTick(() => this.table.updateScrollY());
}, },
......
...@@ -374,7 +374,8 @@ ...@@ -374,7 +374,8 @@
if (column.filteredValue && column.filteredValue.length) { if (column.filteredValue && column.filteredValue.length) {
this.store.commit('filterChange', { this.store.commit('filterChange', {
column, column,
values: column.filteredValue values: column.filteredValue,
silent: true
}); });
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment