react-deep-search-box

This component solving complex searching in javascript `Array`, `Array of object` and also it will eaisly search any string inside `Nested` data.

$5

2 downloads
ramkonda393

react-deep-search-box

This component solving complex searching in javascript Array, Array of object, Nesteseted Array of obejct/array data.

Installation

To install run the following command:

  npm install react-deep-search-box

if @babel/runtime not installed then install it with below

  npm install @babel/runtime -D

Usage

First import it in your component.

import ReactDeepSearchbox from 'react-deep-search-box';

export default App = () => {

return (<div> <ReactDeepSearchbox items={['apple', 'orange', 'mango']} onResult={(result) => console.log('result', result)} /> </div>); }

To search multiple then just put comma sperated string like mango,oranage then it will search mango and orange in data and return result.

Component Props

  items: [] ----> (PropTypes.array) 

placeHolder: "Search...." ----> (PropTypes.string)

customClass: "" ----> (PropTypes.string)

searchBarClass: "" ----> (PropTypes.string)

btnClass: "" ----> (PropTypes.string)

btnIconOrTxt: "Search" || React.node ----> (PropTypes.string || PropTypes.node)

onResult: PropTypes.func

Monetize your
open-source work

Supercharge your OSS projects by selling npm packages. Get started in just 5 minutes.