/** * * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc.. * * This source code is licensed under the Apache license. * See LICENSE file in the project root for license information. * */ import * as React from 'react'; import { CascaderOption, CascaderValueType, CascaderFieldNames } from './Cascader'; interface MenusProps { value?: CascaderValueType | CascaderValueType[]; activeValue?: CascaderValueType; multiple?: boolean; multipleValue?: CascaderValueType[]; options?: CascaderOption[]; prefixCls?: string; expandTrigger?: string; onSelect: (targetOption: CascaderOption, index: number, e: React.KeyboardEvent) => void; onMultipleSelect: (targetOption: CascaderOption, option: CascaderValueType) => void; onMultipleCancel: (targetOption: CascaderOption, option: CascaderValueType) => void; onMultipleGroupCancel: (targetOption: CascaderOption[]) => void; onMultipleGroupSelect: (targetOption: CascaderOption[]) => void; visible?: boolean; labelRender?: (menu: CascaderOption) => React.ReactElement; dropdownMenuColumnStyle?: React.CSSProperties; defaultFieldNames?: CascaderFieldNames; fieldNames?: CascaderFieldNames; expandIcon?: React.ReactNode; loadingIcon?: React.ReactNode; onlyCheckLeaf?: boolean; onItemDoubleClick: (targetOption: CascaderOption, index: number, e: React.MouseEvent) => void; showItemStrategy?: 'default' | 'child'; showAllCheckbox?: boolean; allCheckboxText?: string; searchInMenu?: boolean; searchPlaceholder?: string; searchValue?: string; setSearchValue?: (e: React.ChangeEvent) => void; checkboxRender?: (option: CascaderOption) => boolean; } interface MenuItems { [index: number]: HTMLLIElement; } declare class Menus extends React.Component { menuItems: MenuItems; delayTimer?: number | null; static defaultProps: MenusProps; componentDidMount(): void; componentDidUpdate(prevProps: MenusProps): void; getFieldName(name: string): any; getOption(option: CascaderOption, menuIndex: number, propsOptions: CascaderOption[]): JSX.Element; getActiveOptions(values?: CascaderValueType): CascaderOption[]; getShowOptions(): CascaderOption[][]; delayOnSelect(onSelect: any, ...args: any[]): void; scrollActiveItemToView(): void; getIsMultipleActive(option: CascaderOption, menuIndex: number): boolean | 0 | "some"; getIsShowChildMultipleActive(option: CascaderOption, menuIndex: number): boolean | 0 | "some"; getIsDefaultMultipleActive(option: CascaderOption, menuIndex: number): boolean | "some"; isActiveOption(option: CascaderOption, menuIndex: number): boolean; saveMenuItem: (index: number) => (node: any) => void; getMultipleCheckAll: (options: CascaderOption[]) => boolean; getMultipleCheckIndeterminate: (options: CascaderOption[]) => boolean; renderCheckAll: (options: CascaderOption[]) => React.ReactNode; renderInput: (isHidden: boolean) => JSX.Element; render(): JSX.Element; } export default Menus;