@@ -2,6 +2,7 @@ import React from 'react';
22import CSSMotionList from 'rc-animate/lib/CSSMotionList' ;
33import classNames from 'classnames' ;
44import toArray from 'rc-util/lib/Children/toArray' ;
5+ import type { TableProps } from 'rc-table' ;
56import Table from 'rc-table' ;
67import '../../assets/index.less' ;
78import './animation.less' ;
@@ -10,7 +11,7 @@ type MotionBodyProps = React.HTMLAttributes<HTMLTableSectionElement>;
1011
1112const MotionBody : React . FC < MotionBodyProps > = ( { children, ...props } ) => {
1213 const nodeList = toArray ( children ) ;
13- const nodesRef = React . useRef < Record < React . Key , React . ReactElement > > ( { } ) ;
14+ const nodesRef = React . useRef < Record < string , React . ReactElement > > ( { } ) ;
1415
1516 // Better apply clean up logic to avoid OOM
1617 const keys : React . Key [ ] = [ ] ;
@@ -46,9 +47,9 @@ interface DemoState {
4647}
4748
4849class Demo extends React . Component < { } , DemoState > {
49- columns = [
50+ columns : TableProps [ 'columns' ] = [
5051 { title : 'title1' , dataIndex : 'a' , key : 'a' , width : 100 } ,
51- { id : '123' , title : 'title2' , dataIndex : 'b' , key : 'b' , width : 100 } ,
52+ { title : 'title2' , dataIndex : 'b' , key : 'b' , width : 100 } ,
5253 { title : 'title3' , dataIndex : 'c' , key : 'c' , width : 200 } ,
5354 {
5455 title : 'Operations' ,
0 commit comments