Skip to content

Commit

Permalink
Allow sort direction of "none" to be applied multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielliwerant committed Oct 1, 2019
1 parent f0ea9e5 commit bdff5fa
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 @@ -413,7 +413,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 bdff5fa

Please sign in to comment.