From a15c492dd1e4ceae05aabc1c2632f89b10258941 Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 25 Apr 2017 18:24:43 +0300 Subject: [PATCH] native sort will be disabled upon `remote` function detection with `sort` set to true --- src/BootstrapTable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/BootstrapTable.js b/src/BootstrapTable.js index d04233ee5..7ce532741 100644 --- a/src/BootstrapTable.js +++ b/src/BootstrapTable.js @@ -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); }