springload/react-simpler-select

Name: react-simpler-select

Owner: Springload

Description: React component that renders a select. Supports optgroups, multiple selections.

Created: 2016-03-16 21:34:59.0

Updated: 2017-07-27 21:51:28.0

Pushed: 2017-06-14 22:30:33.0

Homepage: https://springload.github.io/react-simpler-select/

Size: 285

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

react-simpler-select npm Build Status Coverage Status

React component that renders a select. Supports optgroups, multiple selections.

Check out the online demo!

Features
Installation
install --save react-simpler-select
Usage
rt Select from 'react-simpler-select';

t options = [
value: 'en', label: 'English' },
value: 'es', label: 'Spanish' },


ect
aceholder="Choose a language"
lue="en"
tions={options}
Change={onChange}


dd props as you go, they will be transfered to the `select` element.
ect
lue="en"
tions={options}
Change={this.handleChange}
toFocus


upports `optgroup`s with their own array of options.
t 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' } ]



ect options={optgroups}/>

upports `multiple` select. Just make the `value` prop an array, and get selected options as an array in the `onChange` callback.
ect value={[ 'ch', 'qt']}/>
Development
Install

Clone the project on your computer, and install Node. This project also uses nvm.

install
en, install all project dependencies.
install
stall the git hooks.
ithooks/deploy
Working on the project

Everything mentioned in the installation process should already be done.

ke sure you use the right node version.
use
art the server and the development tools.
run start
ns linting.
run lint
ns tests.
run test
ew other available commands with:
run
Releases
run dist
e irish-pub to check the package content. Install w/ npm install -g first.
h-pub
publish

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.