aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/SearchBox.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/SearchBox.js')
-rw-r--r--vnext/src/ui/SearchBox.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/vnext/src/ui/SearchBox.js b/vnext/src/ui/SearchBox.js
index 3f0b884b..aab49757 100644
--- a/vnext/src/ui/SearchBox.js
+++ b/vnext/src/ui/SearchBox.js
@@ -3,9 +3,22 @@ import { withRouter } from 'react-router-dom';
import { useFormState } from 'react-use-form-state';
/**
- * @param {{ pathname: string, onSearch: function, history: import('history').History }} props
+ * @typedef {Object} SearchBoxPropsFields
+ * @property {string} pathname
+ * @property {function} onSearch
+ */
+
+ /**
+ * @typedef {import('react-router-dom').RouteComponentProps & SearchBoxPropsFields} SearchBoxProps
+ */
+
+/**
+ * @param {SearchBoxProps} props
*/
function SearchBox({ onSearch, history, pathname }) {
+ /**
+ * @type {(React.FormEvent<HTMLFormElement>)}
+ */
let onSubmit = (event) => {
event.preventDefault();
onSearch(history, pathname, formState.values.search);