Skip to content

Commit

Permalink
(feat) send request on enter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukundan314 committed May 29, 2021
1 parent 6514852 commit 884c505
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

## 1.1.0

- Support formating of responses based on language
- Support formating of responses based on language

## 1.0.0

Expand Down
20 changes: 12 additions & 8 deletions webview/components/RequestBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ export const RequestBar = (props) => {
setLoadingResponse,
} = props;
return (
<div className="request-bar">
<form
className="request-bar"
onSubmit={(e) => {
sendRequest();
if (requestUrl !== "") {
setLoadingResponse(true);
}
e.preventDefault();
}}
>
<select
name="request-type"
id="request-type"
Expand All @@ -37,17 +46,12 @@ export const RequestBar = (props) => {
<button
name="request-send"
id="request-send"
type="submit"
className="button-request-send"
onClick={() => {
sendRequest();
if (requestUrl !== "") {
setLoadingResponse(true);
}
}}
>
Send
</button>
</div>
</form>
);
};

Expand Down

0 comments on commit 884c505

Please sign in to comment.