![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
react-search-field
Advanced tools
An elegant search field component for React.
The component takes the following props.
Prop | Type | Description |
---|---|---|
classNames | string | Additional classnames for the component |
searchText | string | Initial search value of the input |
placeholder | string | placeholder for the search input |
disabled | boolean | Disabling the search input |
onChange | function | Callback function to invoke when the user press any key. The function should contain two parameters(value, event). |
onEnter | function | Callback function to invoke when the user press enter after pressing few keys. The function should contain two parameters(value, event). |
onSearchClick | function | Callback function to invoke when the user click the search button. The function should contain one parameter(value). |
onBlur | function | Callback function to invoke when the user blurs the search box. The function should contain two parameters(value, event). |
npm install react-search-field --save
import SearchField from "react-search-field";
<SearchField
placeholder="Search..."
onChange={onChange}
searchText="This is initial search text"
classNames="test-class"
/>
npm start
MIT Licensed. Copyright (c) Farhad Yasir 2021.
FAQs
This is a simple search field component for react
The npm package react-search-field receives a total of 1,015 weekly downloads. As such, react-search-field popularity was classified as popular.
We found that react-search-field demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.