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
144144 listHeader | Text at the beginning of suggestions | String | -
145145 fetchDataUrl | Data source url | String | -
146146 noDataText | Text to display when no results | String | No Results
147+ initialValue | Text to display initially | String | -
147148 inputContainerStyle | Styles for autocomplete container | Object | -
148149 inputStyle | Styles for autocomplete input | Object | -
149150 spinnerStyle | Styles for activity indicator | Object | -
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Autocomplete extends Component {
1313 constructor ( props ) {
1414 super ( props ) ;
1515 this . state = {
16- inputValue : "" ,
16+ inputValue : props . initialValue || "" ,
1717 loading : false ,
1818 filteredItems : [ ] ,
1919 } ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ type AutocompleteProps = {
1818 listHeader ?: string ,
1919 fetchDataUrl ?: string ,
2020 noDataText ?: string ;
21+ initialValue ?: string ;
2122 inputContainerStyle ?: StyleProp < ViewStyle > ;
2223 inputStyle ?: StyleProp < TextStyle > ;
2324 spinnerStyle ?: StyleProp < ViewStyle > ;
You can’t perform that action at this time.
0 commit comments