From b9612aaa231b54cf2973b486fb35916a38e9e0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 5 Nov 2018 10:38:55 -0800 Subject: [PATCH] minor code style change --- public/app/plugins/panel/graph2/module.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/public/app/plugins/panel/graph2/module.tsx b/public/app/plugins/panel/graph2/module.tsx index a666d762062..837109f6be7 100644 --- a/public/app/plugins/panel/graph2/module.tsx +++ b/public/app/plugins/panel/graph2/module.tsx @@ -45,24 +45,15 @@ export class Graph2 extends PureComponent { export class GraphOptions extends PureComponent> { onToggleLines = () => { - this.props.onChange({ - ...this.props.options, - showLines: !this.props.options.showLines, - }); + this.props.onChange({ showLines: !this.props.options.showLines, ...this.props.options }); }; onToggleBars = () => { - this.props.onChange({ - ...this.props.options, - showBars: !this.props.options.showBars, - }); + this.props.onChange({ showBars: !this.props.options.showBars, ...this.props.options }); }; onTogglePoints = () => { - this.props.onChange({ - ...this.props.options, - showPoints: !this.props.options.showPoints, - }); + this.props.onChange({ showPoints: !this.props.options.showPoints, ...this.props.options }); }; render() {