* added packages reference menu item. * removed the draft flag. * Updated docs by running script.
3.4 KiB
+++
-----------------------------------------------------------------------
Do not edit this file. It is automatically generated by API Documenter.
-----------------------------------------------------------------------
title = "FieldConfigEditorConfig" keywords = ["grafana","documentation","sdk","@grafana/data"] type = "docs" +++
FieldConfigEditorConfig interface
Signature
export interface FieldConfigEditorConfig<TOptions, TSettings = any, TValue = any>
Import
import { FieldConfigEditorConfig } from '@grafana/data';
Properties
Property | Type | Description |
---|---|---|
category | string[] |
Array of strings representing category of the field config property. First element in the array will make option render as collapsible section. |
defaultValue | TValue |
|
description | string |
Description of the field config property. Will be displayed in the UI as form element description. |
name | string |
Name of the field config property. Will be displayed in the UI as form element label. |
path | (keyof TOptions & string) | string |
Path of the field config property to control. |
settings | TSettings |
Custom settings of the editor. |
shouldApply | (field: Field) => boolean |
Function that allows specifying whether or not this field config should apply to a given field. |
showIf | (currentConfig: TOptions) => boolean |
Function that enables configuration of when field config property editor should be shown based on current panel field config. |
category property
Array of strings representing category of the field config property. First element in the array will make option render as collapsible section.
Signature
category?: string[];
defaultValue property
Signature
defaultValue?: TValue;
description property
Description of the field config property. Will be displayed in the UI as form element description.
Signature
description?: string;
name property
Name of the field config property. Will be displayed in the UI as form element label.
Signature
name: string;
path property
Path of the field config property to control.
Signature
path: (keyof TOptions & string) | string;
Example
Given field config object of a type:
interface CustomFieldConfig {
a: {
b: string;
}
}
path can be either 'a' or 'a.b'.
settings property
Custom settings of the editor.
Signature
settings?: TSettings;
shouldApply property
Function that allows specifying whether or not this field config should apply to a given field.
Signature
shouldApply?: (field: Field) => boolean;
showIf property
Function that enables configuration of when field config property editor should be shown based on current panel field config.
Signature
showIf?: (currentConfig: TOptions) => boolean;