react-auto-search

1.0.4 • Public • Published

react-auto-search

Keyword search component for react js

NPM JavaScript Style Guide

Install

npm install --save react-auto-search

Usage

import React, { Component } from 'react'
import axios from 'axios'
import AutoSearch from 'react-auto-search'

const instance = axios.create({
    baseURL: '',    /* API BASE URL */
    headers: {
        /* AUTHENTICATION TOKEN */
    }
})

class Example extends Component {
  render () {
    return (
      <AutoSearch 
          selectedItems = {[]}
          url = {""}    /* /path/queryString/path */
          onSelectedItemChanged = {(items) => {console.log("SELECTED ITEM ::: ",items)}}
          isMultiple = {true}
          axiosInstance = {instance}
          idColumnKey="id"    
          valueColumnKey="serialNumber"
          responseListSize={10}
          placeholder="Type something to search locks..."
          activeListItemColor="#f4b342"
          selectedListItemColor="#41f4f4"
          isShowRemoveIcon={false}
      />
    )
  }
}

License

MIT © [Narenthera prasanth](https://github.com/Narenthera prasanth)

Readme

Keywords

none

Package Sidebar

Install

npm i react-auto-search

Weekly Downloads

21

Version

1.0.4

License

MIT

Unpacked Size

3.56 MB

Total Files

6

Last publish

Collaborators

  • narenmnp