Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A react-native package that can be used for search item, select item or choose item. This is pretty simple and awesome to use. I hope you'll love it.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages