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

Function TableHeaderRow

packages/react-aria-components/src/Table.tsx:1065–1097  ·  view source on GitHub ↗
({item}: {item: GridNode<any>})

Source from the content-addressed store, hash-verified

1063});
1064
1065function TableHeaderRow({item}: {item: GridNode<any>}) {
1066 let ref = useRef<HTMLTableRowElement>(null);
1067 let state = useContext(TableStateContext)!;
1068 let {isVirtualized, CollectionBranch} = useContext(CollectionRendererContext);
1069 let {rowProps} = useTableHeaderRow({node: item, isVirtualized}, state, ref);
1070 let {checkboxProps} = useTableSelectAllCheckbox(state);
1071
1072 return (
1073 <TableHeaderRowElementType {...rowProps} ref={ref}>
1074 <Provider
1075 values={[
1076 [
1077 CheckboxContext,
1078 {
1079 slots: {
1080 selection: checkboxProps
1081 }
1082 }
1083 ],
1084 [
1085 CheckboxFieldContext,
1086 {
1087 slots: {
1088 selection: checkboxProps
1089 }
1090 }
1091 ]
1092 ]}>
1093 <CollectionBranch collection={state.collection} parent={item} />
1094 </Provider>
1095 </TableHeaderRowElementType>
1096 );
1097}
1098
1099export interface ColumnRenderProps {
1100 /**

Callers

nothing calls this directly

Calls 2

useTableHeaderRowFunction · 0.90

Tested by

no test coverage detected