Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

CustomControlProps interface

Signature

typescript
export interface CustomControlProps<T> 

Import

typescript
import { CustomControlProps } from '@grafana/ui';

Properties

PropertyTypeDescription
disabledboolean
invalidboolean
isOpenboolean
onBlur() => voidonBlur will be automatically passed to custom control closing the menu on element blur
onClick() => voidonClick will be automatically passed to custom control allowing menu toggle
refReact.Ref<any>
valueSelectableValue<T>Currently selected value

disabled property

Signature

typescript
disabled: boolean;

invalid property

Signature

typescript
invalid: boolean;

isOpen property

Signature

typescript
isOpen: boolean;

onBlur property

onBlur will be automatically passed to custom control closing the menu on element blur

Signature

typescript
onBlur: () => void;

onClick property

onClick will be automatically passed to custom control allowing menu toggle

Signature

typescript
onClick: () => void;

ref property

Signature

typescript
ref: React.Ref<any>;

value property

Currently selected value

Signature

typescript
value?: SelectableValue<T>;