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 @@ -144,6 +144,7 @@ Change valueExtractor and pass the data to Autocomplete without fetchDataUrl
144
144
listHeader | Text at the beginning of suggestions | String | -
145
145
fetchDataUrl | Data source url | String | -
146
146
noDataText | Text to display when no results | String | No Results
147
+ initialValue | Text to display initially | String | -
147
148
inputContainerStyle | Styles for autocomplete container | Object | -
148
149
inputStyle | Styles for autocomplete input | Object | -
149
150
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 @@ -18,6 +18,7 @@ type AutocompleteProps = {
18
18
listHeader ?: string ,
19
19
fetchDataUrl ?: string ,
20
20
noDataText ?: string ;
21
+ initialValue ?: string ;
21
22
inputContainerStyle ?: StyleProp < ViewStyle > ;
22
23
inputStyle ?: StyleProp < TextStyle > ;
23
24
spinnerStyle ?: StyleProp < ViewStyle > ;
You can’t perform that action at this time.
0 commit comments