File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ const getTitleFromCellRenderChildren = ({
6969 if ( typeof children === 'string' || typeof children === 'number' ) {
7070 title = children . toString ( ) ;
7171 } else if (
72- React . isValidElement < React . PropsWithChildren < any > > ( children ) &&
73- typeof children . props . children === 'string'
72+ React . isValidElement < any > ( children ) &&
73+ typeof ( children . props as any ) ? .children === 'string'
7474 ) {
75- title = children . props . children ;
75+ title = ( children . props as any ) ? .children ;
7676 }
7777 }
7878 return title ;
Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ export function convertChildrenToColumns<RecordType>(
2020 children : React . ReactNode ,
2121) : ColumnsType < RecordType > {
2222 return toArray ( children )
23- . filter ( node => React . isValidElement < React . PropsWithChildren < any > > ( node ) )
24- . map ( ( { key, props } ) => {
23+ . filter ( node => React . isValidElement < any > ( node ) )
24+ . map ( node => {
25+ const { key, props } = node as React . ReactElement < any > ;
2526 const { children : nodeChildren , ...restProps } = props ;
2627 const column = {
2728 key,
You can’t perform that action at this time.
0 commit comments