mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-12 08:58:15 +01:00
fix: enter key not submitting new request form (#2630)
This commit is contained in:
parent
7ca59656f2
commit
60a8647e7c
@ -161,7 +161,16 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper>
|
<StyledWrapper>
|
||||||
<Modal size="md" title="New Request" confirmText="Create" handleConfirm={onSubmit} handleCancel={onClose}>
|
<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>
|
<div>
|
||||||
<label htmlFor="requestName" className="block font-semibold">
|
<label htmlFor="requestName" className="block font-semibold">
|
||||||
Type
|
Type
|
||||||
|
Loading…
Reference in New Issue
Block a user