From 1ad6372032a71ef8c437603454605e483d259034 Mon Sep 17 00:00:00 2001 From: Delmer Reed Date: Mon, 30 Jul 2018 17:41:54 -0400 Subject: [PATCH] Remove onClickOutside in favor of onBlur --- ui/src/dashboards/components/InfluxQLEditor.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ui/src/dashboards/components/InfluxQLEditor.tsx b/ui/src/dashboards/components/InfluxQLEditor.tsx index d5bd8747b..cb7cc41ef 100644 --- a/ui/src/dashboards/components/InfluxQLEditor.tsx +++ b/ui/src/dashboards/components/InfluxQLEditor.tsx @@ -8,7 +8,6 @@ import ReactCodeMirror from 'src/dashboards/components/ReactCodeMirror' import TemplateDrawer from 'src/shared/components/TemplateDrawer' import QueryStatus from 'src/shared/components/QueryStatus' import {ErrorHandling} from 'src/shared/decorators/errors' -import OnClickOutside from 'src/shared/components/OnClickOutside' // Utils import {getDeep} from 'src/utils/wrappers' @@ -41,7 +40,6 @@ interface Props { onUpdate: (text: string) => Promise config: QueryConfig templates: Template[] - onClickOutside: () => void } const FIRST_TEMP_VAR = '0.tempVar' @@ -174,13 +172,6 @@ class InfluxQLEditor extends Component { ) } - public handleClickOutside = (): void => { - this.setState({focused: false}) - - this.hideTemplateValues() - this.handleBlurEditor() - } - private handleTemplateSelection = ( selectedTemplate: TempVar, templatingQueryText: string @@ -410,4 +401,4 @@ class InfluxQLEditor extends Component { } } -export default OnClickOutside(InfluxQLEditor) +export default InfluxQLEditor