Skip to content

Commit

Permalink
fix default sort bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Sep 28, 2015
1 parent f704495 commit 3eb6dbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ BootstrapTable.defaultProps = {
search: false,
columnFilter: false,
options: {
sortName: null,
sortName: undefined,
sortOrder: Const.SORT_DESC,
afterTableComplete: undefined,
afterDeleteRow: undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TableHeader extends React.Component{

componentDidMount(){
//default sorting
if(this.props.sortName !== null){
if(this.props.sortName){
this.clearSortCaret(this.props.sortOrder, this.props.sortName);
var row = this.refs.header.getDOMNode();
for(var i=0;i<row.childElementCount;i++){
Expand Down

0 comments on commit 3eb6dbe

Please sign in to comment.