react-deep-search-box
v0.1.8
Published
This component solving complex searching in javascript `Array`, `Array of object`, Nesteseted Array `of obejct/array` data.
Downloads
6
Maintainers
Readme
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>);
}
Mutiple Search
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