react-auto-search
v1.0.4
Published
Keyword search component for react js
Downloads
13
Readme
react-auto-search
Keyword search component for react js
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)