11// Type definitions for react-native-dropdown-autocomplete 1.0
22
33import * as React from 'react' ;
4+ import { ViewStyle , TextStyle , StyleProp } from 'react-native' ;
45
56type AutocompleteProps = {
67 autoCorrect ?: boolean ,
@@ -16,19 +17,19 @@ type AutocompleteProps = {
1617 listHeader ?: string ,
1718 fetchDataUrl ?: string ,
1819 noDataText ?: string ;
19- inputContainerStyle ?: any ;
20- inputStyle ?: any ;
21- spinnerStyle ?: any ;
22- noDataTextStyle ?: any ;
23- separatorStyle ?: any ;
24- listFooterStyle ?: any ;
25- listHeaderStyle ?: any ;
26- rightContentStyle ?: any ;
27- rightContentItemStyle ?: any ;
28- listHeaderTextStyle ?: any ;
29- overlayStyle ?: any ;
30- pickerStyle ?: any ;
31- containerStyle ?: any ;
20+ inputContainerStyle ?: StyleProp < ViewStyle > ;
21+ inputStyle ?: StyleProp < TextStyle > ;
22+ spinnerStyle ?: StyleProp < ViewStyle > ;
23+ noDataTextStyle ?: StyleProp < TextStyle > ;
24+ separatorStyle ?: StyleProp < ViewStyle > ;
25+ listFooterStyle ?: StyleProp < ViewStyle > ;
26+ listHeaderStyle ?: StyleProp < ViewStyle > ;
27+ rightContentStyle ?: StyleProp < ViewStyle > ;
28+ rightContentItemStyle ?: StyleProp < TextStyle > ;
29+ listHeaderTextStyle ?: StyleProp < TextStyle > ;
30+ overlayStyle ?: StyleProp < TextStyle > ;
31+ pickerStyle ?: StyleProp < TextStyle > ;
32+ containerStyle ?: StyleProp < ViewStyle > ;
3233
3334 scrollToInput : ( ev : any ) => void ,
3435 handleSelectItem : ( item : any , index : number ) => void ,
@@ -37,7 +38,7 @@ type AutocompleteProps = {
3738 renderIcon ?: ( ) => void ,
3839 valueExtractor ?: ( item : any ) => void ,
3940 rightTextExtractor ?: ( item : any ) => void ,
40- fetchData ?: ( search : string ) => Promise < any > ,
41+ fetchData ?: ( search : string ) => Promise < any [ ] > ,
4142}
4243
4344export class Autocomplete extends React . Component < AutocompleteProps , any > {
0 commit comments