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

FieldConfigEditorBuilder class

Fluent API for declarative creation of field config option editors

Signature

typescript
export declare class FieldConfigEditorBuilder<TOptions> extends OptionsUIRegistryBuilder<TOptions, FieldConfigEditorProps<any, any>, FieldConfigPropertyItem<TOptions>> 

Import

typescript
import { FieldConfigEditorBuilder } from '@grafana/data';

Methods

MethodModifiersDescription
addBooleanSwitch(config)
addColorPicker(config)
addNumberInput(config)
addRadio(config)
addSelect(config)
addSliderInput(config)
addTextInput(config)
addUnitPicker(config)

addBooleanSwitch method

Signature

typescript
addBooleanSwitch<TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings, boolean>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings, boolean>

Returns:

this

addColorPicker method

Signature

typescript
addColorPicker<TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings, string>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings, string>

Returns:

this

addNumberInput method

Signature

typescript
addNumberInput<TSettings>(config: FieldConfigEditorConfig<TOptions, TSettings & NumberFieldConfigSettings, number>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings & NumberFieldConfigSettings, number>

Returns:

this

addRadio method

Signature

typescript
addRadio<TOption, TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings, TOption>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings, TOption>

Returns:

this

addSelect method

Signature

typescript
addSelect<TOption, TSettings extends SelectFieldConfigSettings<TOption>>(config: FieldConfigEditorConfig<TOptions, TSettings, TOption>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings, TOption>

Returns:

this

addSliderInput method

Signature

typescript
addSliderInput<TSettings>(config: FieldConfigEditorConfig<TOptions, TSettings & SliderFieldConfigSettings, number>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings & SliderFieldConfigSettings, number>

Returns:

this

addTextInput method

Signature

typescript
addTextInput<TSettings>(config: FieldConfigEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string>

Returns:

this

addUnitPicker method

Signature

typescript
addUnitPicker<TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings & UnitFieldConfigSettings, string>): this;

Parameters

ParameterTypeDescription
configFieldConfigEditorConfig<TOptions, TSettings & UnitFieldConfigSettings, string>

Returns:

this