Skip to content

Commit

Permalink
Allow sort direction of "none" to be applied multiple times (gregnb#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielliwerant authored and lalong13 committed Jan 15, 2020
1 parent b99ca0f commit b6d26bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MUIDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class MUIDataTable extends React.Component {
column.options.sortDirection = 'none';
}

if (column.options.sortDirection !== undefined) {
if (column.options.sortDirection !== undefined && column.options.sortDirection !== 'none') {
if (sortDirectionSet) {
console.error('sortDirection is set for more than one column. Only the first column will be considered.');
column.options.sortDirection = 'none';
Expand Down

0 comments on commit b6d26bc

Please sign in to comment.