File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ Change valueExtractor and pass the data to Autocomplete without fetchDataUrl
145
145
listHeader | Text at the beginning of suggestions | String | -
146
146
fetchDataUrl | Data source url | String | -
147
147
noDataText | Text to display when no results | String | No Results
148
+ initialValue | Text to display initially | String | -
148
149
inputContainerStyle | Styles for autocomplete container | Object | -
149
150
inputStyle | Styles for autocomplete input | Object | -
150
151
spinnerStyle | Styles for activity indicator | Object | -
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Autocomplete extends Component {
13
13
constructor ( props ) {
14
14
super ( props ) ;
15
15
this . state = {
16
- inputValue : "" ,
16
+ inputValue : props . initialValue || "" ,
17
17
loading : false ,
18
18
filteredItems : [ ] ,
19
19
} ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ type AutocompleteProps = {
19
19
listHeader ?: string ,
20
20
fetchDataUrl ?: string ,
21
21
noDataText ?: string ;
22
+ initialValue ?: string ;
22
23
inputContainerStyle ?: StyleProp < ViewStyle > ;
23
24
inputStyle ?: StyleProp < TextStyle > ;
24
25
spinnerStyle ?: StyleProp < ViewStyle > ;
You can’t perform that action at this time.
0 commit comments