From 97501e0e1f608b7aa9916303499575914c0bfe2f Mon Sep 17 00:00:00 2001 From: koenvg Date: Tue, 7 Mar 2017 17:29:51 +0100 Subject: [PATCH] fix(typings): Make optional props of Search, optional in the typing definition. (#1407) --- src/modules/Search/Search.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/Search/Search.d.ts b/src/modules/Search/Search.d.ts index 530408d843..eda0656762 100644 --- a/src/modules/Search/Search.d.ts +++ b/src/modules/Search/Search.d.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { default as SearchCategory, SearchCategoryProps} from './SearchCategory'; +import { default as SearchCategory, SearchCategoryProps } from './SearchCategory'; import { default as SearchResult, SearchResultProps } from './SearchResult'; import { default as SearchResults } from './SearchResults'; @@ -80,7 +80,7 @@ interface SearchProps { * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props. */ - onBlur: (event: React.MouseEvent, data: SearchProps) => void; + onBlur?: (event: React.MouseEvent, data: SearchProps) => void; /** * Called on focus. @@ -88,7 +88,7 @@ interface SearchProps { * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props. */ - onFocus: (event: React.MouseEvent, data: SearchProps) => void; + onFocus?: (event: React.MouseEvent, data: SearchProps) => void; /** * Called on mousedown. @@ -96,7 +96,7 @@ interface SearchProps { * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props. */ - onMouseDown: (event: React.MouseEvent, data: SearchProps) => void; + onMouseDown?: (event: React.MouseEvent, data: SearchProps) => void; /** * Called when a result is selected. @@ -104,7 +104,7 @@ interface SearchProps { * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {object} data - All props. */ - onResultSelect: (event: React.MouseEvent, data: SearchResultProps) => void; + onResultSelect?: (event: React.MouseEvent, data: SearchResultProps) => void; /** * Called on search input change. @@ -112,7 +112,7 @@ interface SearchProps { * @param {SyntheticEvent} event - React's original SyntheticEvent. * @param {string} value - Current value of search input. */ - onSearchChange: (event: React.MouseEvent, value: string) => void; + onSearchChange?: (event: React.MouseEvent, value: string) => void; // ------------------------------------ // Style @@ -131,7 +131,7 @@ interface SearchProps { fluid?: boolean; /** A search input can take up the width of its container. */ - input: any; + input?: any; /** A search can show a loading indicator. */ loading?: boolean;