Commit 083cc0bb by corpglory-dev

Aftermerge fixes

parent 250ee229
......@@ -16,8 +16,8 @@ const labelWidth = 8;
const piechartOptions = [{ value: PiechartType.PIE, label: 'Pie' }, { value: PiechartType.DONUT, label: 'Donut' }];
export class PiechartOptionsBox extends PureComponent<PanelEditorProps<PiechartOptions>> {
onPieTypeChange = ({ target }) => this.props.onChange({ ...this.props.options, pieType: target.value });
onStrokeWidthChange = ({ target }) => this.props.onChange({ ...this.props.options, strokeWidth: target.value });
onPieTypeChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, pieType: target.value });
onStrokeWidthChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, strokeWidth: target.value });
render() {
const { options } = this.props;
......
......@@ -7,19 +7,19 @@ import { PiechartOptions, PiechartValueOptions } from './types';
export default class PiechartPanelEditor extends PureComponent<PanelEditorProps<PiechartOptions>> {
onValueOptionsChanged = (valueOptions: PiechartValueOptions) =>
this.props.onChange({
this.props.onOptionsChange({
...this.props.options,
valueOptions,
});
render() {
const { onChange, options } = this.props;
const { onOptionsChange, options } = this.props;
return (
<>
<PanelOptionsGrid>
<PiechartValueEditor onChange={this.onValueOptionsChanged} options={options.valueOptions} />
<PiechartOptionsBox onChange={onChange} options={options} />
<PiechartOptionsBox onOptionsChange={onOptionsChange} options={options} />
</PanelOptionsGrid>
</>
);
......
import React, { PureComponent } from 'react';
import { FormLabel, PanelOptionsGroup, Select } from '@grafana/ui';
import UnitPicker from 'app/core/components/Select/UnitPicker';
import { FormLabel, PanelOptionsGroup, Select, UnitPicker } from '@grafana/ui';
import { PiechartValueOptions } from './types';
const statOptions = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment