Socket
Socket
Sign inDemoInstall

react-editable-select

Package Overview
Dependencies
23
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-editable-select

A select component that can be switched to text input to allow adding new elements.


Version published
Maintainers
1
Weekly downloads
51
increased by13.33%
Bundle size
35 bytes
Minified + gzipped

Weekly downloads

Readme

Source

react-editable-select

A select component that can be switched to text input to allow adding new elements.

Prerequesites

  • reactstrap
  • bootstrap
  • font-awesome
  • yarn
  • webpack
  • es6

Try it out

  • Activate nodejs
nvm use
  • Install yarn
npm -g install yarn
  • Start webpack dev server
yarn start
  • Goto http://localhost:3001/

How to use

import {EditableSelect} from 'react-editable-select';

...

<EditableSelect
    options={options}
    value={selectedOption}
    getOptionValue={(option) => option.id}
    getOptionLabel={(option) => option.name}
    createOption={(text) => { return {id: 1, name: text} }}
    onChange={(ev, option) => ...}
    />
PropertyDescription
optionsArray of options
valueCurrently selected option
getOptionValueCallback to convert option into option key
getOptionLabelCallback to convert option into option label
createOptionCallback to create a new option
onChangeCallback invoked when option is selected or text field changes

License

MIT

Keywords

FAQs

Last updated on 29 Sep 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc