Skip to content

Commit 261c6ea

Browse files
committed
#1282, able to clean sorted table manually
1 parent b611797 commit 261c6ea

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/BootstrapTable.js

+7
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,13 @@ class BootstrapTable extends Component {
478478
});
479479
}
480480

481+
cleanSort() {
482+
this.store.cleanSortInfo();
483+
this.setState({
484+
reset: false
485+
});
486+
}
487+
481488
handleSort = (order, sortField) => {
482489
if (this.props.options.onSortChange) {
483490
this.props.options.onSortChange(sortField, order, this.props);

src/store/TableDataStore.js

+4
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ export class TableDataStore {
115115
}
116116
}
117117

118+
cleanSortInfo() {
119+
this.sortList = [];
120+
}
121+
118122
setSelectedRowKey(selectedRowKeys) {
119123
this.selected = selectedRowKeys;
120124
}

0 commit comments

Comments
 (0)