@@ -426,7 +426,14 @@ export default function lock(BaseComponent) {
426
426
427
427
getWrapperNode ( type ) {
428
428
type = type ? type . charAt ( 0 ) . toUpperCase ( ) + type . substr ( 1 ) : '' ;
429
- return findDOMNode ( this . refs [ `lock${ type } ` ] ) ;
429
+ try {
430
+ // in case of finding an unmounted component due to cached data
431
+ // need to clear refs of table when dataSource Changed
432
+ // use try catch for temporary
433
+ return findDOMNode ( this . refs [ `lock${ type } ` ] ) ;
434
+ } catch ( error ) {
435
+ return null ;
436
+ }
430
437
}
431
438
432
439
getFirstNormalCellNode ( index ) {
@@ -443,19 +450,43 @@ export default function lock(BaseComponent) {
443
450
getRowNode ( index , type ) {
444
451
type = type ? type . charAt ( 0 ) . toUpperCase ( ) + type . substr ( 1 ) : '' ;
445
452
const table = this [ `table${ type } Inc` ] ;
446
- return findDOMNode ( table . getRowRef ( index ) ) ;
453
+
454
+ try {
455
+ // in case of finding an unmounted component due to cached data
456
+ // need to clear refs of table when dataSource Changed
457
+ // use try catch for temporary
458
+ return findDOMNode ( table . getRowRef ( index ) ) ;
459
+ } catch ( error ) {
460
+ return null ;
461
+ }
447
462
}
448
463
449
464
getHeaderCellNode ( index , i , type ) {
450
465
type = type ? type . charAt ( 0 ) . toUpperCase ( ) + type . substr ( 1 ) : '' ;
451
466
const table = this [ `table${ type } Inc` ] ;
452
- return findDOMNode ( table . getHeaderCellRef ( index , i ) ) ;
467
+
468
+ try {
469
+ // in case of finding an unmounted component due to cached data
470
+ // need to clear refs of table when dataSource Changed
471
+ // use try catch for temporary
472
+ return findDOMNode ( table . getHeaderCellRef ( index , i ) ) ;
473
+ } catch ( error ) {
474
+ return null ;
475
+ }
453
476
}
454
477
455
478
getCellNode ( index , i , type ) {
456
479
type = type ? type . charAt ( 0 ) . toUpperCase ( ) + type . substr ( 1 ) : '' ;
457
480
const table = this [ `table${ type } Inc` ] ;
458
- return findDOMNode ( table . getCellRef ( index , i ) ) ;
481
+
482
+ try {
483
+ // in case of finding an unmounted component due to cached data
484
+ // need to clear refs of table when dataSource Changed
485
+ // use try catch for temporary
486
+ return findDOMNode ( table . getCellRef ( index , i ) ) ;
487
+ } catch ( error ) {
488
+ return null ;
489
+ }
459
490
}
460
491
461
492
render ( ) {
0 commit comments