Skip to content

Commit

Permalink
fix: enter key not submitting new request form (#2630)
Browse files Browse the repository at this point in the history
  • Loading branch information
therealrinku authored Aug 5, 2024
1 parent 7ca5965 commit 60a8647
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/bruno-app/src/components/Sidebar/NewRequest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,16 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => {
return (
<StyledWrapper>
<Modal size="md" title="New Request" confirmText="Create" handleConfirm={onSubmit} handleCancel={onClose}>
<form className="bruno-form" onSubmit={formik.handleSubmit}>
<form
className="bruno-form"
onSubmit={formik.handleSubmit}
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault();
formik.handleSubmit();
}
}}
>
<div>
<label htmlFor="requestName" className="block font-semibold">
Type
Expand Down

0 comments on commit 60a8647

Please sign in to comment.