From 7a60d954a21e8211166e8f416909ef093dc8c5a4 Mon Sep 17 00:00:00 2001 From: Ran Byron Date: Tue, 1 Jan 2019 16:48:05 +0200 Subject: [PATCH] Fix: Query editor duplicates keystrokes [#2972] --- client/app/components/QueryEditor.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/app/components/QueryEditor.jsx b/client/app/components/QueryEditor.jsx index c972a48254..9c4d78f305 100644 --- a/client/app/components/QueryEditor.jsx +++ b/client/app/components/QueryEditor.jsx @@ -108,7 +108,14 @@ class QueryEditor extends React.Component { static getDerivedStateFromProps(nextProps, prevState) { if (!nextProps.schema) { - return { keywords: [], liveAutocompleteDisabled: false }; + return { + keywords: { + table: [], + column: [], + tableColumn: [], + }, + liveAutocompleteDisabled: false, + }; } else if (nextProps.schema !== prevState.schema) { const tokensCount = nextProps.schema.reduce((totalLength, table) => totalLength + table.columns.length, 0); return {