Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-simpler-select
Advanced tools
React component that renders a select. Supports optgroups, multiple selections.
React component that renders a select. Supports optgroups, multiple selections.
Check out the online demo!
<select>
.<option>
elements itself from the expected data structure.placeholder
prop to create a placeholder option at the top of the select.<optgroup>
elements if the options
follow the expected data structure.onChange
returns supports single and multiple
values in a convenient format.npm install --save react-simpler-select
import Select from 'react-simpler-select';
const options = [
{ value: 'en', label: 'English' },
{ value: 'es', label: 'Spanish' },
];
<Select
placeholder="Choose a language"
value="en"
options={options}
onChange={onChange}
/>
// Add props as you go, they will be transfered to the `select` element.
<Select
value="en"
options={options}
onChange={this.handleChange}
autoFocus
/>
// Supports `optgroup`s with their own array of options.
const optgroups = [
{
title: 'North Island',
id: 'ni',
options: [ { value: 'wgtn', label: 'Wellington' }, { value: 'gsb', label: 'Gisbourne' } ]
},
{
title: 'South Island',
id: 'si',
options: [ { value: 'ch', label: 'Christchurch' }, { value: 'qt', label: 'Queenstown' } ]
},
];
<Select options={optgroups}/>
// Supports `multiple` select. Just make the `value` prop an array, and get selected options as an array in the `onChange` callback.
<Select value={[ 'ch', 'qt']}/>
Clone the project on your computer, and install Node. This project also uses nvm.
nvm install
# Then, install all project dependencies.
npm install
# Install the git hooks.
./.githooks/deploy
Everything mentioned in the installation process should already be done.
# Make sure you use the right node version.
nvm use
# Start the server and the development tools.
npm run start
# Runs linting.
npm run lint
# Runs tests.
npm run test
# View other available commands with:
npm run
package.json
, following semver.npm run dist
# Use irish-pub to check the package content. Install w/ npm install -g first.
irish-pub
npm publish
prop-types
as peerDependency (#26).pkg.module
field to enable tree shaking.FAQs
React component that renders a select. Supports optgroups, multiple selections.
The npm package react-simpler-select receives a total of 2 weekly downloads. As such, react-simpler-select popularity was classified as not popular.
We found that react-simpler-select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.