Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-select-checked
Advanced tools
A React select based on JedWatson/React-Select with checkmarks on selected options.
A React select based on JedWatson/React-Select with checkmarks on selected options.
npm install react-select-checked --save
At this point you can import react-select-checked in your application as follows:
import Select from 'react-select-checked';
React-Select-Checked generates a hidden text field containing the selected value, so you can submit it as part of a standard form. You can also listen for changes with the onChange
event property.
Options should be provided as an Array
of Object
s, each with a value
and label
property for rendering and searching. You can use a disabled
property to indicate whether the option is disabled or not.
The value
property of each option should be set to either a string or a number.
When the value is changed, onChange(selectedValueOrValues)
will fire.
var Select = require('react-select-checked');
var options = [
{ value: 'one', label: 'One' },
{ value: 'two', label: 'Two' }
];
function logChange(val) {
console.log('Selected: ', val);
}
<CheckedSelect
name="form-field-name"
value="one"
options={options}
onChange={logChange}
/>
Property | Type | Default | Description |
---|---|---|---|
addAllTitle | string | 'Add all' | text to display when allowCreate is true |
clearAllTitle | string | 'Clear' | text to display when allowCreate is true |
disabled | bool | 'Add "{label}"?' | text to display when allowCreate is true |
ignoreAccents | bool | true | whether to strip accents when filtering |
ignoreCase | bool | true | whether to perform case-insensitive filtering |
label | string | '' | text to display when allowCreate is true |
onChange | func | undefined | onChange handler: function(newOption) {} |
options | array | undefined | array of options |
placeholder | string|node | 'Please select ..' | field placeholder, displayed when there's no value |
FAQs
A React select based on JedWatson/React-Select with checkmarks on selected options.
We found that react-select-checked 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.