UNPKG

771 BTypeScriptView Raw
1/**
2 * Stabilizes the ListContext value for the Option component, so it doesn't change when sibling Options update.
3 *
4 * @param value The value of the Option.
5 * @returns The stable ListContext value.
6 *
7 * Demos:
8 *
9 * - [Select](https://mui.com/base-ui/react-select/#hooks)
10 *
11 * API:
12 *
13 * - [useOptionContextStabilizer API](https://mui.com/base-ui/react-select/hooks-api/#use-option-context-stabilizer)
14 */
15export declare function useOptionContextStabilizer<OptionValue>(value: OptionValue): {
16 contextValue: {
17 dispatch: (action: import("../useList").ListAction<OptionValue>) => void;
18 getItemState: (itemValue: OptionValue) => {
19 highlighted: boolean;
20 selected: boolean;
21 focusable: boolean;
22 };
23 };
24};