@trail-ui/react
Version:
24 lines (21 loc) • 1.01 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import react__default from 'react';
import { FocusHandlerContextType, FocusData } from '../types.js';
import { Cell, Table } from '@tanstack/react-table';
import '../constants.js';
import 'react-select';
import '../../pagination/pagination.js';
declare const FocusHandlerContext: react__default.Context<FocusHandlerContextType>;
interface FocusHandlerProviderProps<TData> {
table: Table<TData>;
children: react__default.ReactNode;
}
declare function FocusHandlerContextProvider<TData>(props: FocusHandlerProviderProps<TData>): react_jsx_runtime.JSX.Element;
declare function useFocusHandler<TData>(cell?: Cell<TData, unknown>, isHeader?: boolean): {
focusedCell: FocusData;
setFocusedCell: (focusData: FocusData) => void;
tableRef: react__default.RefObject<HTMLTableElement>;
isCurrentCellFocused: boolean;
focusCurrentCell: () => void;
};
export { FocusHandlerContext, FocusHandlerContextProvider as default, useFocusHandler };