File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ const useSearch = (props, tableManager) => {
5151 for ( let index = 0 ; index < cols . length ; index ++ ) {
5252 const currentColumn = cols [ index ] ;
5353 const value = currentColumn . getValue ( {
54+ tableManager,
5455 value : item [ key ] ,
5556 column : currentColumn ,
5657 rowData : item ,
5758 } ) ;
5859 isValid = currentColumn . search ( {
5960 value : value ?. toString ( ) || "" ,
6061 searchText : searchApi . validSearchText ,
61- rowData : item ,
6262 } ) ;
6363
6464 if ( isValid ) break ;
@@ -72,7 +72,7 @@ const useSearch = (props, tableManager) => {
7272
7373 return rows ;
7474 } ,
75- [ columns , searchApi . validSearchText ]
75+ [ columns , searchApi . validSearchText , tableManager ]
7676 ) ;
7777
7878 return searchApi ;
Original file line number Diff line number Diff line change @@ -41,12 +41,16 @@ const useSort = (props, tableManager) => {
4141 rows = [ ...rows ] ;
4242 rows . sort ( ( a , b ) => {
4343 const aVal = cols [ sortApi . sort . colId ] . getValue ( {
44+ tableManager,
4445 value : a [ cols [ sortApi . sort . colId ] . field ] ,
4546 column : cols [ sortApi . sort . colId ] ,
47+ rowData : a ,
4648 } ) ;
4749 const bVal = cols [ sortApi . sort . colId ] . getValue ( {
50+ tableManager,
4851 value : b [ cols [ sortApi . sort . colId ] . field ] ,
4952 column : cols [ sortApi . sort . colId ] ,
53+ rowData : b ,
5054 } ) ;
5155
5256 if ( cols [ sortApi . sort . colId ] . sortable === false ) return 0 ;
@@ -60,7 +64,7 @@ const useSort = (props, tableManager) => {
6064
6165 return rows ;
6266 } ,
63- [ sortApi . sort , columns ]
67+ [ sortApi . sort , columns , tableManager ]
6468 ) ;
6569
6670 sortApi . toggleSort = ( colId ) => {
You can’t perform that action at this time.
0 commit comments