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

SelectAsyncProps interface

Signature

typescript
export interface SelectAsyncProps<T> 

Import

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

Properties

PropertyTypeDescription
cacheOptionsbooleanIf cacheOptions is true, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
defaultOptionsboolean | Array<SelectableValue<T>>When specified as boolean the loadOptions will execute when component is mounted
loadingMessagestringMessage to display when options are loading
loadOptions(query: string) => Promise<Array<SelectableValue<T>>>Asynchronously load select options

cacheOptions property

If cacheOptions is true, then the loaded data will be cached. The cache will remain until cacheOptions changes value.

Signature

typescript
cacheOptions?: boolean;

defaultOptions property

When specified as boolean the loadOptions will execute when component is mounted

Signature

typescript
defaultOptions?: boolean | Array<SelectableValue<T>>;

loadingMessage property

Message to display when options are loading

Signature

typescript
loadingMessage?: string;

loadOptions property

Asynchronously load select options

Signature

typescript
loadOptions?: (query: string) => Promise<Array<SelectableValue<T>>>;