20180827 release

This commit is contained in:
AllenFang
2018-08-27 22:51:08 +08:00
parent 26c184d966
commit 6905c4dfa8
3 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ It's simple!! configure [`sortFunc`](./column-props.html#columnsortfunc-function
text: 'Product ID',
sort: true
// Perform a reverse sorting here
sortFunc: (a, b, order, dataField) => {
sortFunc: (a, b, order, dataField, rowA, rowB) => {
if (order === 'asc') {
return b - a;
}
+2 -2
View File
@@ -107,13 +107,13 @@ It's only used for [`column.formatter`](#columnformatter-function), you can defi
Enable the column sort via a `true` value given.
## column.sortFunc - [Function]
`column.sortFunc` only work when `column.sort` is enable. `sortFunc` allow you to define your sorting algorithm. This callback function accept four arguments:
`column.sortFunc` only work when `column.sort` is enable. `sortFunc` allow you to define your sorting algorithm. This callback function accept six arguments:
```js
{
// omit...
sort: true,
sortFunc: (a, b, order, dataField) => {
sortFunc: (a, b, order, dataField, rowA, rowB) => {
if (order === 'asc') return a - b;
else return b - a;
}