Skip to content

style(Search): update typings #1332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export type SemanticWIDTHS = SemanticWIDTHSNUMBER | SemanticWIDTHSSTRING;

export type SemanticGenericOnClick = (event: any, value: any) => void;
export type SemanticFormOnClick = (event: any, object: Object) => void;
export type SemanticSearchOnClick = (event: any, value: any, text: string) => void; // TODO - not sure if this is correct.

// ======================================================
// Events
Expand Down
21 changes: 10 additions & 11 deletions src/modules/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
useValueAndKey,
} from '../../lib'
import Input from '../../elements/Input'

import SearchCategory from './SearchCategory'
import SearchResult from './SearchResult'
import SearchResults from './SearchResults'
Expand Down Expand Up @@ -48,6 +47,15 @@ export default class Search extends Component {
PropTypes.object,
]),

/** Minimum characters to query for results */
minCharacters: PropTypes.number,

/** Additional text for "No Results" message with less emphasis. */
noResultsDescription: PropTypes.string,

/** Message to display when there are no results. */
noResultsMessage: PropTypes.string,

/** Controls whether or not the results menu is displayed. */
open: PropTypes.bool,

Expand All @@ -64,16 +72,7 @@ export default class Search extends Component {
PropTypes.object,
]),

/** Minimum characters to query for results */
minCharacters: PropTypes.number,

/** Additional text for "No Results" message with less emphasis. */
noResultsDescription: PropTypes.string,

/** Message to display when there are no results. */
noResultsMessage: PropTypes.string,

/** Whether the search should automatically select the first result after searching */
/** Whether the search should automatically select the first result after searching. */
selectFirstResult: PropTypes.bool,

/** Whether a "no results" message should be shown if no results are found. */
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Search/SearchCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SearchCategory.propTypes = {
*/
renderer: PropTypes.func,

/** Array of Search.Result props */
/** Array of Search.Result props. */
results: PropTypes.array,
}

Expand Down
Loading