We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f48434e + 83d20d4 commit 9ea9a79Copy full SHA for 9ea9a79
src/components/advanced-search-form/advanced-search-form.jsx
@@ -78,9 +78,19 @@ export function AdvancedSearchForm() {
78
browserHistory.push(`/search?q=${encodeURIComponent(resultingQuery)}`),
79
);
80
81
+ const onKeyDown = useEvent((e) => {
82
+ if (
83
+ e.code === 'Enter' &&
84
+ e.target.matches('input[type="text"], input[type="date"], input[type="search"]')
85
+ ) {
86
+ e.preventDefault();
87
+ onSearch();
88
+ }
89
+ });
90
+
91
return (
92
<filtersContext.Provider value={ctxValue}>
- <div className={style.form}>
93
+ <div className={style.form} onKeyDown={onKeyDown}>
94
<Section title="What to search">
95
<div className={style.searchInputBox}>
96
<input
0 commit comments