@@ -74,47 +74,48 @@ require('./searchbar.css');
7474 */
7575class SearchBar extends React . Component {
7676 static propTypes = {
77+ autoFocusOnSelect : PropTypes . bool ,
78+ blurResetDelay : PropTypes . number ,
7779 className : PropTypes . string ,
80+ delay : PropTypes . number ,
81+ error : PropTypes . object ,
82+ hideOnBlur : PropTypes . bool ,
83+ isSearchClickable : PropTypes . bool ,
84+ loading : PropTypes . bool ,
85+ maxResults : PropTypes . number ,
86+ onCancelSelectedItem : PropTypes . func ,
87+ onPurgeResults : PropTypes . func ,
7888 onSearch : PropTypes . func ,
7989 onSearchReset : PropTypes . func ,
80- onPurgeResults : PropTypes . func ,
8190 onSearchTextChange : PropTypes . func ,
82- onCancelSelectedItem : PropTypes . func ,
91+ optionsIcon : PropTypes . string ,
8392 placeholder : PropTypes . string ,
8493 placeholderMsgId : PropTypes . string ,
85- delay : PropTypes . number ,
86- hideOnBlur : PropTypes . bool ,
87- blurResetDelay : PropTypes . number ,
88- typeAhead : PropTypes . bool ,
89- searchText : PropTypes . string ,
9094 removeIcon : PropTypes . string ,
91- optionsIcon : PropTypes . string ,
9295 searchIcon : PropTypes . string ,
96+ searchOptions : PropTypes . object ,
97+ searchText : PropTypes . string ,
9398 selectedItems : PropTypes . array ,
94- autoFocusOnSelect : PropTypes . bool ,
9599 splitTools : PropTypes . bool ,
96- isSearchClickable : PropTypes . bool ,
97- loading : PropTypes . bool ,
98- error : PropTypes . object ,
99100 style : PropTypes . object ,
100- searchOptions : PropTypes . object ,
101+ typeAhead : PropTypes . bool ,
101102 // menuOptions
103+ activeSearchTool : PropTypes . string ,
104+ aeronauticalOptions : PropTypes . object ,
105+ constraintsCoordEditor : PropTypes . object ,
106+ coordinate : PropTypes . object ,
107+ defaultZoomLevel : PropTypes . number ,
108+ enabledSearchServicesConfig : PropTypes . bool ,
109+ format : PropTypes . string ,
102110 onChangeActiveSearchTool : PropTypes . func ,
103- onChangeFormat : PropTypes . func ,
104111 onChangeCoord : PropTypes . func ,
112+ onChangeFormat : PropTypes . func ,
105113 onClearCoordinatesSearch : PropTypes . func ,
106114 onToggleControl : PropTypes . func ,
107115 onZoomToPoint : PropTypes . func ,
108- format : PropTypes . string ,
109- activeSearchTool : PropTypes . string ,
110- defaultZoomLevel : PropTypes . number ,
111- showOptions : PropTypes . bool ,
112116 showAddressSearchOption : PropTypes . bool ,
113117 showCoordinatesSearchOption : PropTypes . bool ,
114- enabledSearchServicesConfig : PropTypes . bool ,
115- aeronauticalOptions : PropTypes . object ,
116- constraintsCoordEditor : PropTypes . object ,
117- coordinate : PropTypes . object
118+ showOptions : PropTypes . bool
118119 } ;
119120
120121 static contextTypes = {
@@ -137,6 +138,7 @@ class SearchBar extends React.Component {
137138 autoFocusOnSelect : true ,
138139 splitTools : true ,
139140 isSearchClickable : true ,
141+ maxResults : 15 ,
140142 typeAhead : true ,
141143 searchText : "" ,
142144 hideOnBlur : true ,
@@ -491,7 +493,7 @@ class SearchBar extends React.Component {
491493 if ( ( text === undefined || text === "" ) && ( ! this . props . selectedItems || this . props . selectedItems . length === 0 ) ) {
492494 this . props . onSearchReset ( ) ;
493495 } else if ( text !== undefined && text !== "" ) {
494- this . props . onSearch ( text , this . props . searchOptions ) ;
496+ this . props . onSearch ( text , this . props . searchOptions , this . props . maxResults ) ;
495497 }
496498 } ;
497499 zoomToPoint = ( ) => {
0 commit comments