@fluentui/react-northstar
Version:
A themable React component library.
15 lines (14 loc) • 705 B
TypeScript
import * as React from 'react';
import { FlatTreeItem } from './hooks/flattenTree';
export interface TreeRenderContextValue {
getItemById: (id: string) => FlatTreeItem & {
[key: string]: any;
};
registerItemRef: (id: string, node: HTMLElement) => void;
toggleItemActive: (e: React.SyntheticEvent, idToToggle: string) => void;
focusItemById: (id: string) => void;
expandSiblings: (e: React.SyntheticEvent, id: string) => void;
toggleItemSelect: (e: React.SyntheticEvent, idToToggle: string) => void;
getToFocusIDByFirstCharacter: (e: React.KeyboardEvent, idToStartSearch: string) => string;
}
export declare const TreeContext: React.Context<TreeRenderContextValue>;