New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

input-search-reactjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

input-search-reactjs

A simple search/filter component

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

This package is a distribution of search-input, compiled for searching items.

🛠 Installation

You can install input-search-reactjs by using npm install input-search-reactjs or npm i input-search-reactjs which will provide access to searching the data easier.

1.Import the package

import SearchInput from 'input-search-reactjs';

2.Create state to store your matched values

const [matchedData,setMatchedData] = useState([]);

3.Props

  • data: exisiting data (array).
  • matchedValue: function to store your matched values(function).

Example

function App(){
    const data = ['example','data']; //existing data
    const [matchedData,setMatchedData] = useState([]);
    return(
        <div>
            <SearchInput data={data} matchedValue={(e)=>setMatchedData(e)}/>
            {
                matchedData.map((value)=>(
                    <p>{value}</p> //matched data compared with existing data
                ))
            }
        </div>
    )
}

🤝 Show your support

Give a ⭐ if this package helped you!

Keywords

javascript

FAQs

Package last updated on 26 Apr 2025

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