Package Exports
- react-native-autocomplete-modal
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-autocomplete-modal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
To get started:
Install Native Base at first.
npm install native-base --save
Then install autocomplete module
npm i react-native-autocomplete-modal --save
Import
Import module in your project like,
import AutoComplete from "react-native-autocomplete-modal";
Usage
const countries = [
{name: "Pakistan"},
{name: "Turkey"}
]
<AutoComplete
onSelect={data => console.log(data)}
dataSource={countries}
textLabel="Select Country"
searchPlaceholder='Search Country'
cancelText="Close"
textColor="white"
searchField="name"
/>
Props | Required | Type | Description |
---|---|---|---|
dataSource | Yes | Array | You can put either array of string, integer or object |
searchField | No | String | If array contains strings or integers then searchField is not required else you have to put string like user.county.name as a string |
style | No | Object | Styling for Button |
textColor | No | String | Like blue, #FFF |
textLabel | No | String | Like Select option or Choose one |
value | No | String | Selected value can be set |
searchPlaceholder | No | String | Like Search country |
cancelText | No | String | Like Cancel |