mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
shortening callback functions
This commit is contained in:
parent
736db86d6e
commit
3ce45e7154
@ -65,16 +65,16 @@ export default class MappingRow extends PureComponent<Props, State> {
|
||||
label="From"
|
||||
labelWidth={4}
|
||||
inputWidth={8}
|
||||
onChange={(event: ChangeEvent<HTMLInputElement>) => this.onMappingFromChange(event)}
|
||||
onBlur={() => this.updateMapping()}
|
||||
onBlur={this.updateMapping}
|
||||
onChange={this.onMappingFromChange}
|
||||
value={from}
|
||||
/>
|
||||
<FormField
|
||||
label="To"
|
||||
labelWidth={4}
|
||||
inputWidth={8}
|
||||
onBlur={() => this.updateMapping}
|
||||
onChange={(event: ChangeEvent<HTMLInputElement>) => this.onMappingToChange(event)}
|
||||
onBlur={this.updateMapping}
|
||||
onChange={this.onMappingToChange}
|
||||
value={to}
|
||||
/>
|
||||
<div className="gf-form gf-form--grow">
|
||||
@ -95,8 +95,8 @@ export default class MappingRow extends PureComponent<Props, State> {
|
||||
<FormField
|
||||
label="Value"
|
||||
labelWidth={4}
|
||||
onBlur={() => this.updateMapping}
|
||||
onChange={(event: ChangeEvent<HTMLInputElement>) => this.onMappingValueChange(event)}
|
||||
onBlur={this.updateMapping}
|
||||
onChange={this.onMappingValueChange}
|
||||
value={value}
|
||||
inputWidth={8}
|
||||
/>
|
||||
|
@ -21,8 +21,8 @@ export default class GaugeOptionsEditor extends PureComponent<PanelOptionsProps<
|
||||
|
||||
return (
|
||||
<PanelOptionsGroup title="Gauge">
|
||||
<FormField label="Min value" labelWidth={8} onChange={event => this.onMinValueChange(event)} value={minValue} />
|
||||
<FormField label="Max value" labelWidth={8} onChange={event => this.onMaxValueChange(event)} value={maxValue} />
|
||||
<FormField label="Min value" labelWidth={8} onChange={this.onMinValueChange} value={minValue} />
|
||||
<FormField label="Max value" labelWidth={8} onChange={this.onMaxValueChange} value={maxValue} />
|
||||
<Switch
|
||||
label="Show labels"
|
||||
labelClass="width-8"
|
||||
|
@ -56,22 +56,12 @@ export default class ValueOptions extends PureComponent<PanelOptionsProps<GaugeO
|
||||
label="Decimals"
|
||||
labelWidth={labelWidth}
|
||||
placeholder="auto"
|
||||
onChange={event => this.onDecimalChange(event)}
|
||||
onChange={this.onDecimalChange}
|
||||
value={decimals || ''}
|
||||
type="number"
|
||||
/>
|
||||
<FormField
|
||||
label="Prefix"
|
||||
labelWidth={labelWidth}
|
||||
onChange={event => this.onPrefixChange(event)}
|
||||
value={prefix || ''}
|
||||
/>
|
||||
<FormField
|
||||
label="Suffix"
|
||||
labelWidth={labelWidth}
|
||||
onChange={event => this.onSuffixChange(event)}
|
||||
value={suffix || ''}
|
||||
/>
|
||||
<FormField label="Prefix" labelWidth={labelWidth} onChange={this.onPrefixChange} value={prefix || ''} />
|
||||
<FormField label="Suffix" labelWidth={labelWidth} onChange={this.onSuffixChange} value={suffix || ''} />
|
||||
</PanelOptionsGroup>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user