Skip to content

Commit c84b2e8

Browse files
fall back to invoking the form's submit also onBlur
1 parent 9d887c3 commit c84b2e8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

client/src/features/groupsV2/search/GroupSearchBar.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ export default function GroupSearchBar() {
9494
type="text"
9595
placeholder="Search..."
9696
{...field}
97-
onBlur={(e) => {
98-
// Avoid triggering this on Enter key press by checking the target of the event
99-
if (!(e.relatedTarget?.getAttribute("type") === "submit"))
100-
handleSubmit((data) => onSubmit(data));
101-
}}
97+
onBlur={(e) => e.currentTarget.form?.requestSubmit()}
10298
></input>
10399
)}
104100
/>

0 commit comments

Comments
 (0)