fix: revert enter key submit logic for new request form (#3114)

This commit is contained in:
lohit 2024-09-17 15:20:54 +05:30 committed by GitHub
parent 3cb3f8094f
commit 260996a0ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,16 +162,7 @@ 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}
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault();
formik.handleSubmit();
}
}}
>
<form className="bruno-form" onSubmit={formik.handleSubmit}>
<div>
<label htmlFor="requestName" className="block font-semibold">
Type