fix provide more parameters for getting multi-sort value
This commit is contained in:
parent
88e02b38b6
commit
1f1a2a3914
|
@ -211,8 +211,8 @@ function sort(Table, Icon) {
|
|||
var preKey = pre[currentCol.key];
|
||||
var afterKey = after[currentCol.key];
|
||||
if (getMultiSorterValueFunc) {
|
||||
preKey = getMultiSorterValueFunc(preKey);
|
||||
afterKey = getMultiSorterValueFunc(afterKey);
|
||||
preKey = getMultiSorterValueFunc(pre, currentCol);
|
||||
afterKey = getMultiSorterValueFunc(after, currentCol);
|
||||
}
|
||||
var colSortFun = currentCol.sorter;
|
||||
if (typeof colSortFun !== 'function') {
|
||||
|
|
|
@ -121,7 +121,7 @@ import 'bee-table/build/Table.css';
|
|||
|width|宽度的特定比例根据列的宽度计算|String/Number|-|
|
||||
|fixed| 当表水平滚动时,此列将被固定:true或'left'或'right'| true/'left'/'right'|-|
|
||||
|sorter|前端列排序方法,只要列上有此属性就说明这列可排序。**注:默认是前端排序,排序方法书写时注意有些字段的值可能是undefined的情况,需要转换成0**| function|-|
|
||||
|getMultiSorterValue| 多列排序的时候,可以使用此方法得到单元格中显示的值,用来进行排序中的判断|Function(row)|-|
|
||||
|getMultiSorterValue| 多列排序的时候,可以使用此方法得到单元格中显示的值,用来进行排序中的判断|Function(data, col)|-|
|
||||
|sorterClick|排序的回调函数|function|-|
|
||||
|render|cell的render函数有三个参数:这个单元格的文本,这行的记录,这行的索引,它返回一个对象:{children:value,props:{colSpan:1,rowSpan:1}} ==>'children'是这个单元格的文本,props是这个单元格的一些设置,可以设置单元格行/列合并。2.2.48及以后版本新增第四个参数options为column设置的属性|-|
|
||||
|onCellClick|单击列的单元格时调用|Function(row, event)|-|
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "2.2.48-nc.1",
|
||||
"version": "2.2.48-nc.2",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
|
@ -120,8 +120,8 @@ export default function sort(Table, Icon) {
|
|||
let preKey = pre[currentCol.key];
|
||||
let afterKey = after[currentCol.key];
|
||||
if (getMultiSorterValueFunc) {
|
||||
preKey = getMultiSorterValueFunc(preKey)
|
||||
afterKey = getMultiSorterValueFunc(afterKey)
|
||||
preKey = getMultiSorterValueFunc(pre, currentCol)
|
||||
afterKey = getMultiSorterValueFunc(after, currentCol)
|
||||
}
|
||||
let colSortFun = currentCol.sorter;
|
||||
if(typeof colSortFun !== 'function'){
|
||||
|
|
Loading…
Reference in New Issue