Skip to content

Commit 581e5a2

Browse files
committed
fix: CDataTable: fix isSortable method
1 parent cebb691 commit 581e5a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/table/CDataTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const CDataTable = props => {
9898

9999
const isSortable = i => {
100100
const isDataColumn = itemsDataColumns.includes(rawColumnNames[i])
101-
return sorter && fields && fields[i].sorter !== false && isDataColumn
101+
return sorter && (!fields || fields[i].sorter !== false) && isDataColumn
102102
}
103103

104104
const headerStyles = (index) => {

0 commit comments

Comments
 (0)