🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

react-tnt-test

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-tnt-test

react tiny auto suggest component

1.1.1
unpublished
latest
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created

Install

npm i react-tiny-autosuggest

Usage

import AutoSuggest from 'react-tiny-autosuggest';

render(){
  const suggestions = ['foo', 'bar'];  
  const handleSelect = selection => {console.log(selection)};

  let input;
  const handleSubmit = () => console.log(input.value);

  return (
    // without submit button
    <AutoSuggest
      suggestions = {suggestions}
      onSelect = {handleSelect}
      placeholder = "whatever..."
    />

    <form onSubmit={handleSubmit}>
      <AutoSuggest
        suggestions = {suggestions}
        onSelect = {()=>{}}
        placeholder = "whatever..."
        inputRef = { node => input = node}
    />
    </form>
  )
}

Examples

Here're some live demos

FAQs

Package last updated on 10 May 2018

Did you know?

Socket

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