Socket
Socket
Sign inDemoInstall

react-native-autosuggest

Package Overview
Dependencies
1
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-autosuggest

an autosuggest text input implementation for react native.


Version published
Weekly downloads
58
Maintainers
1
Install size
119 kB
Created
Weekly downloads
 

Readme

Source

AutoSuggest TextInput Component

alt tag

Installation

  • npm install autosuggest --save

Example:

import { TextInput } from 'react-native' import AutoSuggest from 'react-native-autosuggest';

   <AutoSuggest
      onChangeText={(el) => console.log('input changing!')}
      terms={['Apple', 'Banana', 'Orange', 'Strawberry', 'Lemon', 'Cantaloupe', 'Peach', 'Mandarin', 'Date', 'Kiwi']}
      ...
    />


Props:

Refer to React's TextInput documentation for more information on placeholder and onChangeText. Refer to the source code for more information about the rest.

  • onChangeText (function, fired when the input changes.)
  • onChangeTextDebounce (integer, the minimum break in milliseconds that the onChangeText callback needs to take before firing again. default is 0.)
  • onItemPress (function fired when an item in the menu is pressed with that item's string value as the argument. You probably don't need this, and should just use onChangeText)
  • clearBtn (Array e.g. [[] -- only if you want a custom btn component, default is undefined.)
  • clearBtnStyles (Object)
  • terms (Array e.g. ['Chicago', 'New York', 'San Francisco'])
  • placeholder (String e.g. "Please enter a City.")
  • placeholderTextColor (string)
  • otherTextInputProps (object, check the TextInput docs for the full list)
  • containerStyles (object)
  • textInputStyles (Object applies to the TextInput component e.g {width: 400, backgroundColor: "black"})
  • containerStyles (Object)
  • rowWrapperStyles(Object)
  • rowTextStyles (Object)

FAQs

Last updated on 13 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc