Menus.d.ts
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import * as React from 'react';
import { CascaderOption, CascaderFieldNames } from './Cascader';
interface MenusProps {
value?: (string | number)[];
activeValue?: (string | number)[];
options?: CascaderOption[];
prefixCls?: string;
expandTrigger?: string;
onSelect?: (targetOption: string[], index: number, e: React.KeyboardEvent<HTMLElement>) => void;
visible?: boolean;
dropdownMenuColumnStyle?: React.CSSProperties;
defaultFieldNames?: CascaderFieldNames;
fieldNames?: CascaderFieldNames;
expandIcon?: React.ReactNode;
loadingIcon?: React.ReactNode;
onItemDoubleClick?: (targetOption: string[], index: number, e: React.MouseEvent<HTMLElement>) => void;
}
interface MenuItems {
[index: number]: HTMLLIElement;
}
declare class Menus extends React.Component<MenusProps> {
menuItems: MenuItems;
delayTimer: number;
static defaultProps: MenusProps;
componentDidMount(): void;
componentDidUpdate(prevProps: MenusProps): void;
getFieldName(name: any): any;
getOption(option: CascaderOption, menuIndex: number): JSX.Element;
getActiveOptions(values?: CascaderOption[]): CascaderOption[];
getShowOptions(): CascaderOption[][];
delayOnSelect(onSelect: any, ...args: any[]): void;
scrollActiveItemToView(): void;
isActiveOption(option: any, menuIndex: any): boolean;
saveMenuItem: (index: any) => (node: any) => void;
render(): JSX.Element;
}
export default Menus;