@@ -32,7 +32,6 @@ import isVisible from 'rc-util/lib/Dom/isVisible';
32
32
import { isStyleSupport } from 'rc-util/lib/Dom/styleChecker' ;
33
33
import { getTargetScrollBarSize } from 'rc-util/lib/getScrollBarSize' ;
34
34
import useEvent from 'rc-util/lib/hooks/useEvent' ;
35
- import isEqual from 'rc-util/lib/isEqual' ;
36
35
import pickAttrs from 'rc-util/lib/pickAttrs' ;
37
36
import getValue from 'rc-util/lib/utils/get' ;
38
37
import warning from 'rc-util/lib/warning' ;
@@ -41,7 +40,8 @@ import Body from './Body';
41
40
import ColGroup from './ColGroup' ;
42
41
import { EXPAND_COLUMN } from './constant' ;
43
42
import TableContext from './context/TableContext' ;
44
- import FixedHolder , { FixedHeaderProps } from './FixedHolder' ;
43
+ import type { FixedHeaderProps } from './FixedHolder' ;
44
+ import FixedHolder from './FixedHolder' ;
45
45
import Footer , { FooterComponents } from './Footer' ;
46
46
import type { SummaryProps } from './Footer/Summary' ;
47
47
import Summary from './Footer/Summary' ;
@@ -84,27 +84,6 @@ const EMPTY_SCROLL_TARGET = {};
84
84
85
85
export const INTERNAL_HOOKS = 'rc-table-internal-hook' ;
86
86
87
- interface MemoTableContentProps {
88
- children : React . ReactNode ;
89
- pingLeft : boolean ;
90
- pingRight : boolean ;
91
- props : any ;
92
- }
93
-
94
- const MemoTableContent = React . memo < MemoTableContentProps > (
95
- ( { children } ) => children as React . ReactElement ,
96
-
97
- ( prev , next ) => {
98
- if ( ! isEqual ( prev . props , next . props , true ) ) {
99
- return false ;
100
- }
101
-
102
- // No additional render when pinged status change.
103
- // This is not a bug.
104
- return prev . pingLeft !== next . pingLeft || prev . pingRight !== next . pingRight ;
105
- } ,
106
- ) ;
107
-
108
87
export interface TableProps < RecordType = unknown >
109
88
extends Omit < LegacyExpandableProps < RecordType > , 'showExpandColumn' > {
110
89
prefixCls ?: string ;
@@ -731,17 +710,11 @@ function Table<RecordType extends DefaultRecordType>(tableProps: TableProps<Reco
731
710
ref = { fullTableRef }
732
711
{ ...dataProps }
733
712
>
734
- < MemoTableContent
735
- pingLeft = { pingedLeft }
736
- pingRight = { pingedRight }
737
- props = { { ...props , stickyOffsets, mergedExpandedKeys } }
738
- >
739
- { title && < Panel className = { `${ prefixCls } -title` } > { title ( mergedData ) } </ Panel > }
740
- < div ref = { scrollBodyContainerRef } className = { `${ prefixCls } -container` } >
741
- { groupTableNode }
742
- </ div >
743
- { footer && < Panel className = { `${ prefixCls } -footer` } > { footer ( mergedData ) } </ Panel > }
744
- </ MemoTableContent >
713
+ { title && < Panel className = { `${ prefixCls } -title` } > { title ( mergedData ) } </ Panel > }
714
+ < div ref = { scrollBodyContainerRef } className = { `${ prefixCls } -container` } >
715
+ { groupTableNode }
716
+ </ div >
717
+ { footer && < Panel className = { `${ prefixCls } -footer` } > { footer ( mergedData ) } </ Panel > }
745
718
</ div >
746
719
) ;
747
720
0 commit comments