diff --git a/types/react-instantsearch-dom/index.d.ts b/types/react-instantsearch-dom/index.d.ts index f1dec59118..6ecb03c981 100644 --- a/types/react-instantsearch-dom/index.d.ts +++ b/types/react-instantsearch-dom/index.d.ts @@ -118,8 +118,9 @@ export interface SearchBoxProps extends CommonWidgetProps { reset?: JSX.Element; loadingIndicator?: JSX.Element; - onSubmit?: (...args: any[]) => any; - onReset?: (...args: any[]) => any; + onSubmit?: (event: React.SyntheticEvent) => any; + onReset?: (event: React.SyntheticEvent) => any; + onChange?: (event: React.SyntheticEvent) => any; } /** * The SearchBox component displays a search box that lets the user search for a specific query. diff --git a/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx b/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx index 6d9b7b55f8..e10d3fde08 100644 --- a/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx +++ b/types/react-instantsearch-dom/react-instantsearch-dom-tests.tsx @@ -216,6 +216,21 @@ import { Hit, connectRefinementList, connectMenu } from 'react-instantsearch-cor ; }; +(() => { + function onSearchBoxChange(event: React.SyntheticEvent) { + } + + function onSearchBoxReset(event: React.SyntheticEvent) { + } + + function onSearchBoxSubmit(event: React.SyntheticEvent) { + } + + } />; +}); + import { createInstantSearch } from 'react-instantsearch-dom/server'; // import { createServer } from 'http'; declare function createServer(handler: (req: any, res: any) => any): any;