@@ -50,7 +50,7 @@ export interface BaseTableProps extends EventsProps {
5050 onError ?: ( err : Error ) => void ;
5151}
5252
53- type Props = Inula . PropsWithChildren < BaseTableProps > ;
53+ type Props = BaseTableProps & { children ?: Inula . InulaNode } ;
5454
5555const notOptionKeys = [
5656 ...INULA_PRIVATE_PROPS ,
@@ -204,9 +204,12 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
204204 ! isEqual ( eventsBinded . current . records , props . records , { skipFunction : skipFunctionDiff } )
205205 ) {
206206 eventsBinded . current = props ;
207- tableContext . current . table . setRecords ( props . records as any [ ] , {
208- restoreHierarchyState : props . option . restoreHierarchyState
209- } ) ;
207+ tableContext . current . table . setRecords (
208+ props . records as any [ ] ,
209+ {
210+ restoreHierarchyState : props . option . restoreHierarchyState
211+ } as any
212+ ) ;
210213 handleTableRender ( ) ;
211214 }
212215 return ;
@@ -229,7 +232,7 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
229232 prevRecords . current = props . records ;
230233 tableContext . current . table . setRecords ( props . records , {
231234 restoreHierarchyState : props . option ?. restoreHierarchyState
232- } ) ;
235+ } as any ) ;
233236 handleTableRender ( ) ;
234237 }
235238 // tableContext.current = {
@@ -255,7 +258,7 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
255258 < RootTableContext . Provider value = { tableContext . current } >
256259 { toArray ( props . children ) . map ( ( child : Inula . InulaNode , index : number ) => {
257260 if ( typeof child === 'string' ) {
258- return ;
261+ return null ;
259262 }
260263
261264 const childId = getComponentId ( child , index ) ;
@@ -295,6 +298,6 @@ export const createTable = <T extends Props>(componentName: string, type?: strin
295298 }
296299 return props ;
297300 } ) ;
298- Com . displayName = componentName ;
301+ ( Com as any ) . displayName = componentName ;
299302 return Com ;
300303} ;
0 commit comments