File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
website/src/components/APITable Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ interface Props {
2626function getRowName ( node : ReactElement ) : string {
2727 let curNode : ReactNode = node ;
2828 while ( isValidElement ( curNode ) ) {
29- [ curNode ] = React . Children . toArray ( curNode . props . children ) ;
29+ [ curNode ] = React . Children . toArray (
30+ ( curNode . props as { children : ReactNode } ) . children ,
31+ ) ;
3032 }
3133 if ( typeof curNode !== 'string' ) {
3234 throw new Error (
@@ -99,6 +101,7 @@ export default function APITable({children, name}: Props): ReactNode {
99101 highlightedRow . current ?. focus ( ) ;
100102 } , [ highlightedRow ] ) ;
101103 const rows = React . Children . map (
104+ // @ts -expect-error: TODO fix typing
102105 tbody . props . children ,
103106 ( row : ReactElement < ComponentProps < 'tr' > > ) => (
104107 < APITableRowComp name = { name } ref = { highlightedRow } >
You can’t perform that action at this time.
0 commit comments