Skip to content

Commit 06b3560

Browse files
Alexander AlbulAllenFang
Alexander Albul
authored andcommitted
#1752 Sorting field and order is not taken from props when using remote datasource
1 parent 30398e0 commit 06b3560

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/BootstrapTable.js

+6
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)