Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-select-checked

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-checked

A React select based on JedWatson/React-Select with checkmarks on selected options.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React-Select-Checked

A React select based on JedWatson/React-Select with checkmarks on selected options.

Installation

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';

Usage

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 Objects, 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}
/>
PropertyTypeDefaultDescription
addAllTitlestring'Add all'text to display when allowCreate is true
clearAllTitlestring'Clear'text to display when allowCreate is true
disabledbool'Add "{label}"?'text to display when allowCreate is true
ignoreAccentsbooltruewhether to strip accents when filtering
ignoreCasebooltruewhether to perform case-insensitive filtering
labelstring''text to display when allowCreate is true
onChangefuncundefinedonChange handler: function(newOption) {}
optionsarrayundefinedarray of options
placeholderstring|node'Please select ..'field placeholder, displayed when there's no value

Keywords

FAQs

Package last updated on 01 Nov 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc