Skip to content

Commit a949875

Browse files
layershifterharel
authored andcommitted
style(Search): update typings (Semantic-Org#1332)
1 parent 0e6a676 commit a949875

File tree

4 files changed

+209
-166
lines changed

4 files changed

+209
-166
lines changed

src/index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export type SemanticWIDTHS = SemanticWIDTHSNUMBER | SemanticWIDTHSSTRING;
2626

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

3130
// ======================================================
3231
// Events

src/modules/Search/Search.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
useValueAndKey,
1818
} from '../../lib'
1919
import Input from '../../elements/Input'
20-
2120
import SearchCategory from './SearchCategory'
2221
import SearchResult from './SearchResult'
2322
import SearchResults from './SearchResults'
@@ -48,6 +47,15 @@ export default class Search extends Component {
4847
PropTypes.object,
4948
]),
5049

50+
/** Minimum characters to query for results */
51+
minCharacters: PropTypes.number,
52+
53+
/** Additional text for "No Results" message with less emphasis. */
54+
noResultsDescription: PropTypes.string,
55+
56+
/** Message to display when there are no results. */
57+
noResultsMessage: PropTypes.string,
58+
5159
/** Controls whether or not the results menu is displayed. */
5260
open: PropTypes.bool,
5361

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

67-
/** Minimum characters to query for results */
68-
minCharacters: PropTypes.number,
69-
70-
/** Additional text for "No Results" message with less emphasis. */
71-
noResultsDescription: PropTypes.string,
72-
73-
/** Message to display when there are no results. */
74-
noResultsMessage: PropTypes.string,
75-
76-
/** Whether the search should automatically select the first result after searching */
75+
/** Whether the search should automatically select the first result after searching. */
7776
selectFirstResult: PropTypes.bool,
7877

7978
/** Whether a "no results" message should be shown if no results are found. */

src/modules/Search/SearchCategory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SearchCategory.propTypes = {
5959
*/
6060
renderer: PropTypes.func,
6161

62-
/** Array of Search.Result props */
62+
/** Array of Search.Result props. */
6363
results: PropTypes.array,
6464
}
6565

0 commit comments

Comments
 (0)