hightable
Version:
A dynamic windowed scrolling table component for react
16 lines (15 loc) • 625 B
TypeScript
interface CellData {
ariaColIndex: number;
ariaRowIndex: number;
}
type TabIndex = -1 | 0;
interface CellFocus {
/** roving tabindex: -1 for all cells except the current navigation cell, which is 0 */
tabIndex: TabIndex;
/** ref callback to focus the cell if it is the current navigation cell and needs to be focused. Undefined otherwise. */
focusIfNeeded?: (element: HTMLElement | null) => void;
/** function to set the cell as the current navigation cell */
navigateToCell?: () => void;
}
export declare function useCellFocus({ ariaColIndex, ariaRowIndex }: CellData): CellFocus;
export {};