(props: TableDropIndicatorProps, ref: ForwardedRef<HTMLElement>)
| 2261 | }); |
| 2262 | |
| 2263 | function TableDropIndicator(props: TableDropIndicatorProps, ref: ForwardedRef<HTMLElement>) { |
| 2264 | let {dropIndicatorProps, isDropTarget, buttonRef, level, ...otherProps} = props; |
| 2265 | |
| 2266 | let state = useContext(TableStateContext)!; |
| 2267 | let {visuallyHiddenProps} = useVisuallyHidden(); |
| 2268 | let renderProps = useRenderProps({ |
| 2269 | ...otherProps, |
| 2270 | defaultClassName: 'react-aria-DropIndicator', |
| 2271 | defaultStyle: { |
| 2272 | // @ts-ignore |
| 2273 | '--table-row-level': level + 1 |
| 2274 | }, |
| 2275 | values: { |
| 2276 | isDropTarget |
| 2277 | } |
| 2278 | }); |
| 2279 | |
| 2280 | return ( |
| 2281 | <TableDropIndicatorRowElementType |
| 2282 | {...filterDOMProps(props as any, {global: true})} |
| 2283 | {...renderProps} |
| 2284 | role="row" |
| 2285 | ref={ref as RefObject<HTMLTableRowElement | null>} |
| 2286 | data-drop-target={isDropTarget || undefined} |
| 2287 | aria-level={level}> |
| 2288 | <TableDropIndicatorTDElementType |
| 2289 | role="gridcell" |
| 2290 | colSpan={state.collection.columnCount} |
| 2291 | style={{padding: 0}}> |
| 2292 | <div {...visuallyHiddenProps} role="button" {...dropIndicatorProps} ref={buttonRef} /> |
| 2293 | {renderProps.children} |
| 2294 | </TableDropIndicatorTDElementType> |
| 2295 | </TableDropIndicatorRowElementType> |
| 2296 | ); |
| 2297 | } |
| 2298 | |
| 2299 | const TableDropIndicatorForwardRef = forwardRef(TableDropIndicator); |
| 2300 |
nothing calls this directly
no test coverage detected