Skip to content

Commit a5803c0

Browse files
committed
fix lower react version tests
1 parent 95687e9 commit a5803c0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/react-aria-components/src/Table.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,13 @@ class TableHeaderNode<T> extends CollectionNode<T> {
584584
static readonly type = 'tableheader';
585585
}
586586

587-
function THeadElementType(props) {
587+
let THeadElementType = forwardRef(function THeadElementType(props: any, ref: ForwardedRef<Element>) {
588588
let {isVirtualized} = useContext(CollectionRendererContext);
589589
if (isVirtualized) {
590-
return <div {...props} />;
590+
return <div {...props} ref={ref} />;
591591
}
592-
return <thead {...props} />;
593-
}
592+
return <thead {...props} ref={ref} />;
593+
});
594594

595595
/**
596596
* A header within a `<Table>`, containing the table columns.
@@ -1343,6 +1343,7 @@ export const Cell = /*#__PURE__*/ createLeafComponent(TableCellNode, (props: Cel
13431343
}
13441344
});
13451345

1346+
// TODO: Lint doesn't catch these, it thinks we're not in a component render cycle here?
13461347
let TD = useElementType('td');
13471348
let DOMProps = filterDOMProps(props as any, {global: true});
13481349
delete DOMProps.id;

0 commit comments

Comments
 (0)