You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In above case, when user try to sort Job Type column which will sort the original value: 0, 1, 2 but we display the type name via [`column.formatter`](#formatter), which will lead confuse because we are sorting by type value instead of type name. So `sortValue` is a way for you to decide what kind of value should be adopted when sorting on a specify column:
165
+
166
+
```js
167
+
constcolumns= [{
168
+
dataField:'id',
169
+
text:'Job ID'
170
+
}, {
171
+
dataField:'type',
172
+
text:'Job Type'
173
+
sort:true,
174
+
formatter: (cell, row) => types[cell],
175
+
sortValue: (cell, row) => types[cell] // we use type name to sort.
`column.sortFunc` only work when `column.sort`is enable. `sortFunc` allow you to define your sorting algorithm. This callback function accept six arguments:
180
+
`column.sortFunc` only work when `column.sort`enabled. `sortFunc` allow you to define your sorting algorithm. This callback function accept six arguments:
0 commit comments