@@ -106,7 +106,7 @@ export interface TableProps<RecordType = unknown> extends LegacyExpandableProps<
106106 className ?: string ;
107107 style ?: React . CSSProperties ;
108108 children ?: React . ReactNode ;
109- data ?: RecordType [ ] ;
109+ data ?: ReadonlyArray < RecordType > ;
110110 columns ?: ColumnsType < RecordType > ;
111111 rowKey ?: string | GetRowKey < RecordType > ;
112112 tableLayout ?: TableLayout ;
@@ -123,14 +123,14 @@ export interface TableProps<RecordType = unknown> extends LegacyExpandableProps<
123123 // Additional Part
124124 title ?: PanelRender < RecordType > ;
125125 footer ?: PanelRender < RecordType > ;
126- summary ?: ( data : RecordType [ ] ) => React . ReactNode ;
126+ summary ?: ( data : ReadonlyArray < RecordType > ) => React . ReactNode ;
127127
128128 // Customize
129129 id ?: string ;
130130 showHeader ?: boolean ;
131131 components ?: TableComponents < RecordType > ;
132132 onRow ?: GetComponentProps < RecordType > ;
133- onHeaderRow ?: GetComponentProps < ColumnType < RecordType > [ ] > ;
133+ onHeaderRow ?: GetComponentProps < ReadonlyArray < ColumnType < RecordType > > > ;
134134 emptyText ?: React . ReactNode | ( ( ) => React . ReactNode ) ;
135135
136136 direction ?: 'ltr' | 'rtl' ;
@@ -303,7 +303,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
303303 return false ;
304304 } , [ ! ! expandedRowRender , mergedData ] ) ;
305305
306- const [ innerExpandedKeys , setInnerExpandedKeys ] = React . useState < Key [ ] > ( ( ) => {
306+ const [ innerExpandedKeys , setInnerExpandedKeys ] = React . useState ( ( ) => {
307307 if ( defaultExpandedRowKeys ) {
308308 return defaultExpandedRowKeys ;
309309 }
0 commit comments