diff --git a/packages/grafana-ui/src/components/Switch/Switch.tsx b/packages/grafana-ui/src/components/Switch/Switch.tsx index 36475e55acb..e775fdfa48b 100644 --- a/packages/grafana-ui/src/components/Switch/Switch.tsx +++ b/packages/grafana-ui/src/components/Switch/Switch.tsx @@ -14,8 +14,7 @@ export interface Props { export interface State { id: any; } - -export class Switch extends PureComponent { + export class Switch extends PureComponent { state = { id: _.uniqueId(), }; @@ -23,7 +22,7 @@ export class Switch extends PureComponent { internalOnChange = (event: React.FormEvent) => { event.stopPropagation(); - this.props.onChange(); + this.props.onChange(event); }; render() {