({item}: {item: GridNode<any>})
| 1063 | }); |
| 1064 | |
| 1065 | function 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 | |
| 1099 | export interface ColumnRenderProps { |
| 1100 | /** |
nothing calls this directly
no test coverage detected