mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 04:00:13 +08:00
fix sort and filter perf
This commit is contained in:
parent
2651d80fc2
commit
b4a75ddcc9
@ -129,7 +129,9 @@ const Table = React.createClass({
|
||||
Object.keys(filtersFromColumns).forEach(key => {
|
||||
newFilters[key] = filtersFromColumns[key];
|
||||
});
|
||||
this.setState({ filters: newFilters });
|
||||
if (this.isFiltersChanged(newFilters)) {
|
||||
this.setState({ filters: newFilters });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -233,7 +235,7 @@ const Table = React.createClass({
|
||||
};
|
||||
|
||||
// Controlled
|
||||
if (this.getSortOrderColumns() === 0) {
|
||||
if (this.getSortOrderColumns().length === 0) {
|
||||
this.setState(newState);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user