@@ -2,6 +2,7 @@ import React from 'react';
2
2
import CSSMotionList from 'rc-animate/lib/CSSMotionList' ;
3
3
import classNames from 'classnames' ;
4
4
import toArray from 'rc-util/lib/Children/toArray' ;
5
+ import type { TableProps } from 'rc-table' ;
5
6
import Table from 'rc-table' ;
6
7
import '../../assets/index.less' ;
7
8
import './animation.less' ;
@@ -10,7 +11,7 @@ type MotionBodyProps = React.HTMLAttributes<HTMLTableSectionElement>;
10
11
11
12
const MotionBody : React . FC < MotionBodyProps > = ( { children, ...props } ) => {
12
13
const nodeList = toArray ( children ) ;
13
- const nodesRef = React . useRef < Record < React . Key , React . ReactElement > > ( { } ) ;
14
+ const nodesRef = React . useRef < Record < string , React . ReactElement > > ( { } ) ;
14
15
15
16
// Better apply clean up logic to avoid OOM
16
17
const keys : React . Key [ ] = [ ] ;
@@ -46,9 +47,9 @@ interface DemoState {
46
47
}
47
48
48
49
class Demo extends React . Component < { } , DemoState > {
49
- columns = [
50
+ columns : TableProps [ 'columns' ] = [
50
51
{ 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 } ,
52
53
{ title : 'title3' , dataIndex : 'c' , key : 'c' , width : 200 } ,
53
54
{
54
55
title : 'Operations' ,
0 commit comments