Skip to content

Commit beef82c

Browse files
committed
add types for the props
1 parent 4f9e1c2 commit beef82c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ export interface TableHeaderRenderProps {
542542
isHovered: boolean
543543
}
544544

545-
export interface TableHeaderProps<T> extends StyleRenderProps<TableHeaderRenderProps>, HoverEvents {
545+
export interface TableHeaderProps<T> extends StyleRenderProps<TableHeaderRenderProps>, HoverEvents, Pick<React.HTMLAttributes<HTMLTableSectionElement>, 'onScroll'> {
546546
/** A list of table columns. */
547547
columns?: Iterable<T>,
548548
/** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */
@@ -906,7 +906,7 @@ export const ColumnResizer = forwardRef(function ColumnResizer(props: ColumnResi
906906

907907
const tableBodyPropNames = new Set(['onScroll']);
908908

909-
export interface TableBodyRenderProps {
909+
export interface TableBodyRenderProps extends Pick<React.HTMLAttributes<HTMLTableSectionElement>, 'onScroll'> {
910910
/**
911911
* Whether the table body has no rows and should display its empty state.
912912
* @selector [data-empty]
@@ -1002,7 +1002,7 @@ export interface RowRenderProps extends ItemRenderProps {
10021002
id?: Key
10031003
}
10041004

1005-
export interface RowProps<T> extends StyleRenderProps<RowRenderProps>, LinkDOMProps, HoverEvents {
1005+
export interface RowProps<T> extends StyleRenderProps<RowRenderProps>, LinkDOMProps, HoverEvents, Pick<React.HTMLAttributes<HTMLTableRowElement>, 'onContextMenu'> {
10061006
/** A list of columns used when dynamically rendering cells. */
10071007
columns?: Iterable<T>,
10081008
/** The cells within the row. Supports static items or a function for dynamic rendering. */

0 commit comments

Comments
 (0)