From 8eb4cbf66ea46fbc673e26cfbd5d7e619a6eef63 Mon Sep 17 00:00:00 2001 From: Alanna Scott Date: Thu, 8 Sep 2016 13:54:00 -0700 Subject: [PATCH] only show the reset state button if location param (#1075) --- .../javascripts/SqlLab/components/SqlEditorLeft.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx b/caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx index e209e9ae5723e..b3c7bdaf1efe7 100644 --- a/caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx +++ b/caravel/assets/javascripts/SqlLab/components/SqlEditorLeft.jsx @@ -117,6 +117,7 @@ class SqlEditorTopToolbar extends React.Component { } render() { const tables = this.props.tables.filter((t) => (t.queryEditorId === this.props.queryEditor.id)); + const shouldShowReset = window.location.search === '?reset=1'; return (
@@ -159,9 +160,11 @@ class SqlEditorTopToolbar extends React.Component { ))}
- + {shouldShowReset && + + }
); }