///
import * as React from 'react';
import Input from '../input';
export interface CascaderOptionType {
value: string;
label: React.ReactNode;
disabled?: boolean;
children?: Array;
__IS_FILTERED_OPTION?: boolean;
}
export declare type CascaderExpandTrigger = 'click' | 'hover';
export interface ShowSearchType {
filter?: (inputValue: string, path: CascaderOptionType[]) => boolean;
render?: (inputValue: string, path: CascaderOptionType[], prefixCls: string | undefined) => React.ReactNode;
sort?: (a: CascaderOptionType[], b: CascaderOptionType[], inputValue: string) => number;
matchInputWidth?: boolean;
}
export interface CascaderProps {
/** */
options: CascaderOptionType[];
/** */
defaultValue?: string[];
/** */
value?: string[];
/** */
onChange?: (value: string[], selectedOptions?: CascaderOptionType[]) => void;
/** */
displayRender?: (label: string[], selectedOptions?: CascaderOptionType[]) => React.ReactNode;
/** */
style?: React.CSSProperties;
/** */
className?: string;
/** */
popupClassName?: string;
/** :`bottomLeft` `bottomRight` `topLeft` `topRight` */
popupPlacement?: string;
/** */
placeholder?: string;
/** , `large` `default` `small` */
size?: string;
/** */
disabled?: boolean;
/** */
allowClear?: boolean;
showSearch?: boolean | ShowSearchType;
notFoundContent?: React.ReactNode;
loadData?: (selectedOptions?: CascaderOptionType[]) => void;
/** , 'click' 'hover' */
expandTrigger?: CascaderExpandTrigger;
/** true , */
changeOnSelect?: boolean;
/** */
onPopupVisibleChange?: (popupVisible: boolean) => void;
prefixCls?: string;
inputPrefixCls?: string;
getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
popupVisible?: boolean;
}
export interface CascaderState {
inputFocused: boolean;
inputValue: string;
value: string[];
popupVisible: boolean | undefined;
flattenOptions: CascaderOptionType[][];
}
export default class Cascader extends React.Component {
static defaultProps: {
prefixCls: string;
inputPrefixCls: string;
placeholder: string;
transitionName: string;
popupPlacement: string;
options: never[];
disabled: boolean;
allowClear: boolean;
notFoundContent: string;
};
cachedOptions: CascaderOptionType[];
private input;
constructor(props: CascaderProps);
componentWillReceiveProps(nextProps: CascaderProps): void;
handleChange: (value: any, selectedOptions: any[]) => void;
handlePopupVisibleChange: (popupVisible: boolean) => void;
handleInputBlur: () => void;
handleInputClick: (e: React.MouseEvent) => void;
handleKeyDown: (e: React.KeyboardEvent) => void;
handleInputChange: (e: React.ChangeEvent) => void;
setValue: (value: string[], selectedOptions?: any[]) => void;
getLabel(): any;
clearSelection: (e: React.MouseEvent) => void;
flattenTree(options: CascaderOptionType[], changeOnSelect: boolean | undefined, ancestor?: CascaderOptionType[]): any;
generateFilteredOptions(prefixCls: string | undefined): CascaderOptionType[];
focus(): void;
blur(): void;
saveInput: (node: Input) => void;
render(): JSX.Element;
}