( props: AriaTableCellProps, state: TableState<T>, ref: RefObject<FocusableElement | null> )
| 62 | * @param ref - The ref attached to the cell element. |
| 63 | */ |
| 64 | export function useTableCell<T>( |
| 65 | props: AriaTableCellProps, |
| 66 | state: TableState<T>, |
| 67 | ref: RefObject<FocusableElement | null> |
| 68 | ): TableCellAria { |
| 69 | let {gridCellProps, isPressed} = useGridCell(props, state, ref); |
| 70 | let columnKey = props.node.column?.key; |
| 71 | if (columnKey != null && state.collection.rowHeaderColumnKeys.has(columnKey)) { |
| 72 | // oxlint-disable-next-line react/react-compiler |
| 73 | gridCellProps.role = 'rowheader'; |
| 74 | // oxlint-disable-next-line react/react-compiler |
| 75 | gridCellProps.id = getCellId(state, props.node.parentKey!, columnKey); |
| 76 | } |
| 77 | |
| 78 | return { |
| 79 | gridCellProps, |
| 80 | isPressed |
| 81 | }; |
| 82 | } |
no test coverage detected