Skip to content

Commit

Permalink
Fix: enter key runs previous query (#2348)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Jan 18, 2023
1 parent dd737a4 commit 041cefc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/app/views/query-runner/query-input/QueryInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<Stack horizontal={mobileScreen ? false : true} tokens={queryInputStackTokens}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const AutoComplete = (props: IAutoCompleteProps) => {
}

if (filtered.length === 1 && filtered[0] === searchTerm) {
setShouldShowSuggestions(false);
appendSuggestionToUrl(searchTerm);
}
}

Expand Down

0 comments on commit 041cefc

Please sign in to comment.