API Reference@grafana/data › FieldConfigEditorBuilder

FieldConfigEditorBuilder class

Fluent API for declarative creation of field config option editors

Signature

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

Import

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

Methods

Method Modifiers Description
addBooleanSwitch(config)
addColorPicker(config)
addNumberInput(config)
addRadio(config)
addSelect(config)
addTextInput(config)
addUnitPicker(config)

addBooleanSwitch method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings, boolean>

Returns:

this

addColorPicker method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings & ColorFieldConfigSettings, string>

Returns:

this

addNumberInput method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings & NumberFieldConfigSettings, number>

Returns:

this

addRadio method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings, TOption>

Returns:

this

addSelect method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings, TOption>

Returns:

this

addTextInput method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string>

Returns:

this

addUnitPicker method

Signature

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

Parameters

Parameter Type Description
config FieldConfigEditorConfig<TOptions, TSettings & UnitFieldConfigSettings, string>

Returns:

this