react-native-autocomplete-modal

1.0.3 • Public • Published

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 searchFieldis not required else you have to put string like user.county.nameas 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

Package Sidebar

Install

npm i react-native-autocomplete-modal

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

7.89 kB

Total Files

5

Last publish

Collaborators

  • mr.shafique.qadri