问题描述
useSortBy sortType属性的documention说:
sortType: String | Function(rowA: <Row>,rowB: <Row>,columnId: String,desc: Bool)
Used to compare 2 rows of data and order them correctly.
If a function is passed,it must be memoized. The sortType function should return -1 if rowA is larger,and 1 if rowB is larger. react-table will take care of the rest.
String options: basic,datetime,alphanumeric. Defaults to alphanumeric.
The resolved function from the this string/function will be used to sort the this column's data.
If a string is passed,the function with that name located on either the custom sortTypes option or the built-in sorting types object will be used.
If a function is passed,it will be used.
For more information on sort types,see Sorting
但没有描述函数的签名或使用方法。
那么如何提供sortType函数呢?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)