1.0.3 • Published 6 years ago

react-native-autocomplete-modal v1.0.3

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

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"
/>
PropsRequiredTypeDescription
dataSourceYesArrayYou can put either array of string, integer or object
searchFieldNoStringIf array contains strings or integers then searchFieldis not required else you have to put string like user.county.nameas a string
styleNoObjectStyling for Button
textColorNoStringLike blue, #FFF
textLabelNoStringLike Select option or Choose one
valueNoStringSelected value can be set
searchPlaceholderNoStringLike Search country
cancelTextNoStringLike Cancel