+++ # ----------------------------------------------------------------------- # Do not edit this file. It is automatically generated by API Documenter. # ----------------------------------------------------------------------- title = "Cascader" keywords = ["grafana","documentation","sdk","@grafana/ui"] type = "docs" +++ ## Cascader class Signature ```typescript export declare class Cascader extends React.PureComponent ``` Import ```typescript import { Cascader } from '@grafana/ui'; ``` Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [constructor(props)](#constructor-props) | | Constructs a new instance of the Cascader class | Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [flattenOptions](#flattenoptions-property) | | (options: CascaderOption[], optionPath?: CascaderOption[]) => SelectableValue<string[]>[] | | | [onBlur](#onblur-property) | | () => void | | | [onBlurCascade](#onblurcascade-property) | | () => void | | | [onChange](#onchange-property) | | (value: string[], selectedOptions: CascaderOption[]) => void | | | [onCreateOption](#oncreateoption-property) | | (value: string) => void | | | [onInputKeyDown](#oninputkeydown-property) | | (e: React.KeyboardEvent<HTMLInputElement>) => void | | | [onSelect](#onselect-property) | | (obj: SelectableValue<string[]>) => void | | Methods | Method | Modifiers | Description | | --- | --- | --- | | [render()](#render-method) | | | | [setInitialValue(searchableOptions, initValue)](#setinitialvalue-method) | | | ### constructor(props) Constructs a new instance of the `Cascader` class Signature ```typescript constructor(props: CascaderProps); ``` Parameters | Parameter | Type | Description | | --- | --- | --- | | props | CascaderProps | | ### flattenOptions property Signature ```typescript flattenOptions: (options: CascaderOption[], optionPath?: CascaderOption[]) => SelectableValue[]; ``` ### onBlur property Signature ```typescript onBlur: () => void; ``` ### onBlurCascade property Signature ```typescript onBlurCascade: () => void; ``` ### onChange property Signature ```typescript onChange: (value: string[], selectedOptions: CascaderOption[]) => void; ``` ### onCreateOption property Signature ```typescript onCreateOption: (value: string) => void; ``` ### onInputKeyDown property Signature ```typescript onInputKeyDown: (e: React.KeyboardEvent) => void; ``` ### onSelect property Signature ```typescript onSelect: (obj: SelectableValue) => void; ``` ### render method Signature ```typescript render(): JSX.Element; ``` Returns: `JSX.Element` ### setInitialValue method Signature ```typescript setInitialValue(searchableOptions: Array>, initValue?: string): { rcValue: string[]; activeLabel: any; }; ``` Parameters | Parameter | Type | Description | | --- | --- | --- | | searchableOptions | Array<SelectableValue<string[]>> | | | initValue | string | | Returns: `{ rcValue: string[]; activeLabel: any; }`