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
145145 listHeader | Text at the beginning of suggestions | String | -
146146 fetchDataUrl | Data source url | String | -
147147 noDataText | Text to display when no results | String | No Results
148+ initialValue | Text to display initially | String | -
148149 inputContainerStyle | Styles for autocomplete container | Object | -
149150 inputStyle | Styles for autocomplete input | Object | -
150151 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 @@ -19,6 +19,7 @@ type AutocompleteProps = {
1919 listHeader ?: string ,
2020 fetchDataUrl ?: string ,
2121 noDataText ?: string ;
22+ initialValue ?: string ;
2223 inputContainerStyle ?: StyleProp < ViewStyle > ;
2324 inputStyle ?: StyleProp < TextStyle > ;
2425 spinnerStyle ?: StyleProp < ViewStyle > ;
You can’t perform that action at this time.
0 commit comments