diff --git a/src/components/datatable/DataTable.js b/src/components/datatable/DataTable.js index 08cdc759fd..cf853a5404 100644 --- a/src/components/datatable/DataTable.js +++ b/src/components/datatable/DataTable.js @@ -317,7 +317,7 @@ export class DataTable extends Component { sortSingle(data, sortField, sortOrder) { let value = [...data]; - if(this.columnSortable && this.columnSortable === 'custom' && this.columnSortFunction) { + if(this.columnSortable && this.columnSortFunction) { value = this.columnSortFunction({ field: this.getSortField(), order: this.getSortOrder() diff --git a/src/showcase/datatable/DataTableDemo.js b/src/showcase/datatable/DataTableDemo.js index 6c4c4c3467..e6024bc114 100644 --- a/src/showcase/datatable/DataTableDemo.js +++ b/src/showcase/datatable/DataTableDemo.js @@ -683,12 +683,12 @@ multiSortMeta.push({field: 'brand', order: -1}); `} -

To customize sorting algorithm, set sortable option to custom and define a sortFunction that sorts the list.

+

To customize sorting algorithm, define a sortFunction that sorts the list.

{` - +