+++ # ----------------------------------------------------------------------- # Do not edit this file. It is automatically generated by API Documenter. # ----------------------------------------------------------------------- title = "ValueMappingsEditor" keywords = ["grafana","documentation","sdk","@grafana/ui"] type = "docs" draft = true +++ ## ValueMappingsEditor class Signature ```typescript export declare class ValueMappingsEditor extends PureComponent ``` Import ```typescript import { ValueMappingsEditor } from '@grafana/ui'; ``` Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [constructor(props)](#constructor-props) | | Constructs a new instance of the ValueMappingsEditor class | Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [onAddMapping](#onaddmapping-property) | | () => void | | | [onRemoveMapping](#onremovemapping-property) | | (id: number) => void | | | [updateGauge](#updategauge-property) | | (mapping: ValueMapping) => void | | Methods | Method | Modifiers | Description | | --- | --- | --- | | [getMaxIdFromValueMappings(mappings)](#getmaxidfromvaluemappings-method) | | | | [render()](#render-method) | | | ### constructor(props) Constructs a new instance of the `ValueMappingsEditor` class Signature ```typescript constructor(props: Props); ``` Parameters | Parameter | Type | Description | | --- | --- | --- | | props | Props | | ### onAddMapping property Signature ```typescript onAddMapping: () => void; ``` ### onRemoveMapping property Signature ```typescript onRemoveMapping: (id: number) => void; ``` ### updateGauge property Signature ```typescript updateGauge: (mapping: ValueMapping) => void; ``` ### getMaxIdFromValueMappings method Signature ```typescript getMaxIdFromValueMappings(mappings: ValueMapping[]): number; ``` Parameters | Parameter | Type | Description | | --- | --- | --- | | mappings | ValueMapping[] | | Returns: `number` ### render method Signature ```typescript render(): JSX.Element; ``` Returns: `JSX.Element`