Skip to content

Commit

Permalink
fix: CDataTable: fix isSortable method
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Jul 30, 2020
1 parent cebb691 commit 581e5a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/table/CDataTable.js
Expand Up @@ -98,7 +98,7 @@ const CDataTable = props => {

const isSortable = i => {
const isDataColumn = itemsDataColumns.includes(rawColumnNames[i])
return sorter && fields && fields[i].sorter !== false && isDataColumn
return sorter && (!fields || fields[i].sorter !== false) && isDataColumn
}

const headerStyles = (index) => {
Expand Down

0 comments on commit 581e5a2

Please sign in to comment.