Skip to content

Commit ea35ed0

Browse files
nirtamir2devongovettreidbarber
authored
[RAC] Table - allow passing render prop to Cell (#4995)
* Table - allow passing render prop * Fix forwardRef type --------- Co-authored-by: Devon Govett <[email protected]> Co-authored-by: Reid Barber <[email protected]>
1 parent 3276459 commit ea35ed0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,6 @@ export interface CellRenderProps {
656656

657657
export interface CellProps extends RenderProps<CellRenderProps> {
658658
id?: Key,
659-
/** The contents of the cell. */
660-
children: ReactNode,
661659
/** A string representation of the cell's contents, used for features like typeahead. */
662660
textValue?: string
663661
}
@@ -669,7 +667,7 @@ function Cell(props: CellProps, ref: ForwardedRef<HTMLTableCellElement>): JSX.El
669667
/**
670668
* A cell within a table row.
671669
*/
672-
const _Cell = forwardRef(Cell);
670+
const _Cell = /*#__PURE__*/ (forwardRef as forwardRefType)(Cell);
673671
export {_Cell as Cell};
674672

675673
function TableHeaderRowGroup<T>({collection}: {collection: TableCollection<T>}) {

0 commit comments

Comments
 (0)