diff --git a/src/app/views/query-runner/query-input/QueryInput.tsx b/src/app/views/query-runner/query-input/QueryInput.tsx index 0c5308c90..bc0414c2c 100644 --- a/src/app/views/query-runner/query-input/QueryInput.tsx +++ b/src/app/views/query-runner/query-input/QueryInput.tsx @@ -64,16 +64,14 @@ const QueryInput = (props: IQueryInputProps) => { if (!sampleQuery.sampleUrl) { return; } - // allows the state to be populated with the new url before running it - setTimeout(() => { - handleOnRunQuery(); - }, 500); + handleOnRunQuery(sampleQuery); }; const queryInputStackTokens: IStackTokens = { childrenGap: 7 }; + return ( <> diff --git a/src/app/views/query-runner/query-input/auto-complete/AutoComplete.tsx b/src/app/views/query-runner/query-input/auto-complete/AutoComplete.tsx index 0f65ea867..c30bc952f 100644 --- a/src/app/views/query-runner/query-input/auto-complete/AutoComplete.tsx +++ b/src/app/views/query-runner/query-input/auto-complete/AutoComplete.tsx @@ -197,7 +197,7 @@ const AutoComplete = (props: IAutoCompleteProps) => { } if (filtered.length === 1 && filtered[0] === searchTerm) { - setShouldShowSuggestions(false); + appendSuggestionToUrl(searchTerm); } }