Skip to content

Commit

Permalink
Refactor #899
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed May 22, 2019
1 parent 2588ad8 commit 3a7d407
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/datatable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,15 @@ export class DataTable extends Component {

resetColumnOrder() {
let columns = React.Children.toArray(this.props.children);
let columnOrder = [];

this.setState({columnOrder: columns});
for(let column of columns) {
columnOrder.push(column.props.columnKey||column.props.field);
}

this.setState({
columnOrder
});
}

renderLoader() {
Expand Down

0 comments on commit 3a7d407

Please sign in to comment.