aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/SearchBox.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-08-15 09:56:12 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:55 +0300
commitadf830dfcd1350e104b92a0f088e5664a35b7b15 (patch)
treed3c1537144ba33fdddd975b39f8b8d1bf0057c30 /vnext/src/ui/SearchBox.js
parent30723a1df4688c421ccd8ec7b9d804c0bd3d020a (diff)
jsdoc updates
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);