Skip to content

Commit

Permalink
native sort will be disabled upon remote function detection with `s…
Browse files Browse the repository at this point in the history
…ort` set to true
  • Loading branch information
Paveltarno committed Apr 25, 2017
1 parent aacb293 commit a15c492
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ class BootstrapTable extends Component {
const sortName = options.defaultSortName || options.sortName;
const sortOrder = options.defaultSortOrder || options.sortOrder;
const searchText = options.defaultSearch;

if (sortName && sortOrder) {
this.store.setSortInfo(sortOrder, sortName);
this.store.sort();
if (this.props.remote().sort !== true) {
this.store.sort();
}
}

if (searchText) {
this.store.search(searchText);
}
Expand Down

0 comments on commit a15c492

Please sign in to comment.