UNPKG

520 BTypeScriptView Raw
1import * as React from 'react';
2import type { FieldNames, RawValueType } from '../Select';
3/**
4 * Parse `children` to `options` if `options` is not provided.
5 * Then flatten the `options`.
6 */
7declare const useOptions: <OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames, optionFilterProp: string, optionLabelProp: string) => {
8 options: OptionType[];
9 valueOptions: Map<RawValueType, OptionType>;
10 labelOptions: Map<React.ReactNode, OptionType>;
11};
12export default useOptions;