From c633e95e010679cb8dc1b9832e9380524501228a Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sun, 26 Aug 2018 13:21:31 +0800 Subject: [PATCH] patch docs for #501 --- docs/columns.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/columns.md b/docs/columns.md index 330b7ad..d472e67 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -121,15 +121,15 @@ It's only used for [`column.formatter`](#formatter), you can define any value fo 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) => { - if (order === 'asc') return a - b; - else return b - a; + sortFunc: (valueA, valueB, order, dataField, rowA, rowB) => { + if (order === 'asc') return valueA - valueB; + else return valueB - valueA; } } ```