The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/docs/sources/packages_api/ui/cascader.md

3.6 KiB

+++

-----------------------------------------------------------------------

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

export declare class Cascader extends React.PureComponent<CascaderProps, CascaderState> 

Import

import { Cascader } from '@grafana/ui';

Constructors

Constructor Modifiers Description
constructor(props) Constructs a new instance of the Cascader class

Properties

Property Modifiers Type Description
flattenOptions (options: CascaderOption[], optionPath?: CascaderOption[]) => SelectableValue<string[]>[]
onBlur () => void
onBlurCascade () => void
onChange (value: string[], selectedOptions: CascaderOption[]) => void
onCreateOption (value: string) => void
onInputKeyDown (e: React.KeyboardEvent<HTMLInputElement>) => void
onSelect (obj: SelectableValue<string[]>) => void

Methods

Method Modifiers Description
render()
setInitialValue(searchableOptions, initValue)

constructor(props)

Constructs a new instance of the Cascader class

Signature

constructor(props: CascaderProps);

Parameters

Parameter Type Description
props CascaderProps

flattenOptions property

Signature

flattenOptions: (options: CascaderOption[], optionPath?: CascaderOption[]) => SelectableValue<string[]>[];

onBlur property

Signature

onBlur: () => void;

onBlurCascade property

Signature

onBlurCascade: () => void;

onChange property

Signature

onChange: (value: string[], selectedOptions: CascaderOption[]) => void;

onCreateOption property

Signature

onCreateOption: (value: string) => void;

onInputKeyDown property

Signature

onInputKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;

onSelect property

Signature

onSelect: (obj: SelectableValue<string[]>) => void;

render method

Signature

render(): JSX.Element;

Returns:

JSX.Element

setInitialValue method

Signature

setInitialValue(searchableOptions: Array<SelectableValue<string[]>>, initValue?: string): {
        rcValue: string[];
        activeLabel: any;
    };

Parameters

Parameter Type Description
searchableOptions Array<SelectableValue<string[]>>
initValue string

Returns:

{ rcValue: string[]; activeLabel: any; }