Skip to content

Commit 76bb452

Browse files
Alexander Albulpowellandy
authored andcommitted
#1752 Sorting field and order is not taken from props when using remote datasource
1 parent 848b584 commit 76bb452

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/BootstrapTable.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ class BootstrapTable extends Component {
283283
}
284284
newState.data = data;
285285
}
286+
287+
const sortName = options.sortName;
288+
const sortOrder = options.sortOrder;
289+
if (this.props.options.sortName !== sortName || this.props.options.sortOrder !== sortOrder) {
290+
this.store.setSortInfo(sortOrder, options.sortName);
291+
}
286292
this.setState(() => newState);
287293
} else {
288294
// #125

0 commit comments

Comments
 (0)