MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TableColumnHeader

Function TableColumnHeader

starters/hooks/src/Table.tsx:93–106  ·  view source on GitHub ↗
({column, state}: {column: Node<object>; state: TableState<object>})

Source from the content-addressed store, hash-verified

91}
92
93function TableColumnHeader({column, state}: {column: Node<object>; state: TableState<object>}) {
94 let ref = useRef<HTMLTableCellElement>(null);
95 let {columnHeaderProps} = useTableColumnHeader({node: column}, state, ref);
96 let {isFocusVisible, focusProps} = useFocusRing();
97 return (
98 <th
99 {...mergeProps(columnHeaderProps, focusProps)}
100 ref={ref}
101 className="react-aria-Column"
102 data-focus-visible={isFocusVisible || undefined}>
103 {column.rendered}
104 </th>
105 );
106}
107
108function TableRow({
109 item,

Callers

nothing calls this directly

Calls 3

useTableColumnHeaderFunction · 0.90
useFocusRingFunction · 0.90
mergePropsFunction · 0.90

Tested by

no test coverage detected