@@ -383,7 +383,7 @@ export class TableDataStore {
383
383
384
384
_filter ( source ) {
385
385
const filterObj = this . filterObj ;
386
- this . filteredData = source . filter ( row => {
386
+ this . filteredData = source . filter ( ( row , r ) => {
387
387
let valid = true ;
388
388
let filterVal ;
389
389
for ( const key in filterObj ) {
@@ -431,7 +431,7 @@ export class TableDataStore {
431
431
formatExtraData = this . colInfos [ key ] . formatExtraData ;
432
432
filterValue = this . colInfos [ key ] . filterValue ;
433
433
if ( filterFormatted && format ) {
434
- targetVal = format ( row [ key ] , row , formatExtraData ) ;
434
+ targetVal = format ( row [ key ] , row , formatExtraData , r ) ;
435
435
} else if ( filterValue ) {
436
436
targetVal = filterValue ( row [ key ] , row ) ;
437
437
}
@@ -457,7 +457,7 @@ export class TableDataStore {
457
457
default : {
458
458
if ( filterObj [ key ] . type === Const . FILTER_TYPE . SELECT &&
459
459
filterFormatted && filterFormatted && format ) {
460
- filterVal = format ( filterVal , row , formatExtraData ) ;
460
+ filterVal = format ( filterVal , row , formatExtraData , r ) ;
461
461
}
462
462
valid = this . filterText ( targetVal , filterVal ) ;
463
463
break ;
@@ -480,7 +480,7 @@ export class TableDataStore {
480
480
} else {
481
481
searchTextArray . push ( this . searchText ) ;
482
482
}
483
- this . filteredData = source . filter ( row => {
483
+ this . filteredData = source . filter ( ( row , r ) => {
484
484
const keys = Object . keys ( row ) ;
485
485
let valid = false ;
486
486
// for loops are ugly, but performance matters here.
@@ -499,7 +499,7 @@ export class TableDataStore {
499
499
let targetVal = row [ key ] ;
500
500
if ( searchable ) {
501
501
if ( filterFormatted && format ) {
502
- targetVal = format ( targetVal , row , formatExtraData ) ;
502
+ targetVal = format ( targetVal , row , formatExtraData , r ) ;
503
503
} else if ( filterValue ) {
504
504
console . log ( 'inin' ) ;
505
505
targetVal = filterValue ( targetVal , row ) ;
0 commit comments