mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 19:22:57 +08:00

* added packages reference menu item. * removed the draft flag. * Updated docs by running script.
155 lines
4.0 KiB
Markdown
155 lines
4.0 KiB
Markdown
+++
|
|
# -----------------------------------------------------------------------
|
|
# Do not edit this file. It is automatically generated by API Documenter.
|
|
# -----------------------------------------------------------------------
|
|
title = "FieldConfigEditorBuilder"
|
|
keywords = ["grafana","documentation","sdk","@grafana/data"]
|
|
type = "docs"
|
|
+++
|
|
|
|
## FieldConfigEditorBuilder class
|
|
|
|
Fluent API for declarative creation of field config option editors
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
export declare class FieldConfigEditorBuilder<TOptions> extends OptionsUIRegistryBuilder<TOptions, FieldConfigEditorProps<any, any>, FieldConfigPropertyItem<TOptions>>
|
|
```
|
|
<b>Import</b>
|
|
|
|
```typescript
|
|
import { FieldConfigEditorBuilder } from '@grafana/data';
|
|
```
|
|
<b>Methods</b>
|
|
|
|
| Method | Modifiers | Description |
|
|
| --- | --- | --- |
|
|
| [addBooleanSwitch(config)](#addbooleanswitch-method) | | |
|
|
| [addColorPicker(config)](#addcolorpicker-method) | | |
|
|
| [addNumberInput(config)](#addnumberinput-method) | | |
|
|
| [addRadio(config)](#addradio-method) | | |
|
|
| [addSelect(config)](#addselect-method) | | |
|
|
| [addTextInput(config)](#addtextinput-method) | | |
|
|
| [addUnitPicker(config)](#addunitpicker-method) | | |
|
|
|
|
### addBooleanSwitch method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addBooleanSwitch<TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings, boolean>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings, boolean></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|
|
### addColorPicker method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addColorPicker<TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings & ColorFieldConfigSettings, string>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings & ColorFieldConfigSettings, string></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|
|
### addNumberInput method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addNumberInput<TSettings>(config: FieldConfigEditorConfig<TOptions, TSettings & NumberFieldConfigSettings, number>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings & NumberFieldConfigSettings, number></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|
|
### addRadio method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addRadio<TOption, TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings, TOption>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings, TOption></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|
|
### addSelect method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addSelect<TOption, TSettings extends SelectFieldConfigSettings<TOption>>(config: FieldConfigEditorConfig<TOptions, TSettings, TOption>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings, TOption></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|
|
### addTextInput method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addTextInput<TSettings>(config: FieldConfigEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|
|
### addUnitPicker method
|
|
|
|
<b>Signature</b>
|
|
|
|
```typescript
|
|
addUnitPicker<TSettings = any>(config: FieldConfigEditorConfig<TOptions, TSettings & UnitFieldConfigSettings, string>): this;
|
|
```
|
|
<b>Parameters</b>
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| config | <code>FieldConfigEditorConfig<TOptions, TSettings & UnitFieldConfigSettings, string></code> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
`this`
|
|
|