# react-bootstrap-multiselect

> A multiselect component for react (with bootstrap). This is a react port of: https://github.com/davidstutz/bootstrap-multiselect

Latest version **2.4.1** (published 2017-04-21) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install react-bootstrap-multiselect
pnpm add react-bootstrap-multiselect
yarn add react-bootstrap-multiselect
bun add react-bootstrap-multiselect
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.1 |
| Published | 2017-04-21 |
| First published | 2014-07-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 117 |
| Author | skratchdot |
| Maintainers | skratchdot |
| Keywords | react, react-component, bootstrap, multiselect, select, list, ui, checkbox, radio |

## Links

- npm: https://www.npmjs.com/package/react-bootstrap-multiselect
- Repository: https://github.com/skratchdot/react-bootstrap-multiselect
- Homepage: https://github.com/skratchdot/react-bootstrap-multiselect#readme
- Issues: https://github.com/skratchdot/react-bootstrap-multiselect/issues
- npm.io page: https://npm.io/package/react-bootstrap-multiselect

## Dependencies (3)

- [react](https://npm.io/package/react.md) >=15.0.0
- [jquery](https://npm.io/package/jquery.md) >=2.2.0
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 2.4.1 (latest) — 2017-04-21
- 2.4.0 — 2017-04-20
- 2.3.0 — 2016-10-11
- 2.2.0 — 2016-09-10
- 2.1.0 — 2016-08-26
- 2.0.0 — 2016-04-12
- 1.0.2 — 2016-03-14
- 1.0.1 — 2016-01-08
- 1.0.0 — 2015-11-12
- 0.6.0 — 2015-09-16
- 0.5.0 — 2015-09-10
- 0.4.0 — 2015-08-25
- 0.3.0 — 2015-08-24
- 0.2.2 — 2015-07-03
- 0.2.1 — 2015-05-15
- … 9 more at https://npm.io/package/react-bootstrap-multiselect/versions

## README

# react-bootstrap-multiselect

[![NPM version](https://badge.fury.io/js/react-bootstrap-multiselect.svg)](http://badge.fury.io/js/react-bootstrap-multiselect)
[![Dependency Status](https://david-dm.org/skratchdot/react-bootstrap-multiselect.svg)](https://david-dm.org/skratchdot/react-bootstrap-multiselect)
[![devDependency Status](https://david-dm.org/skratchdot/react-bootstrap-multiselect/dev-status.svg)](https://david-dm.org/skratchdot/react-bootstrap-multiselect#info=devDependencies)


## Description

A multiselect component for react (with bootstrap). This is a react wrapper
around an existing jQuery/bootstrap library (it is not a pure react port):

[bootstrap-multiselect](https://github.com/davidstutz/bootstrap-multiselect)


## Getting Started

1) Install the module with: `npm install --save react-bootstrap-multiselect`

2) Create your module (you need to use something like browserify to build)

```javascript
var React = require('react');
var Multiselect = require('react-bootstrap-multiselect');
var someReactComponent = React.createClass({
    render: function () {
        return (
            <Multiselect />
        );
    }
});
```

3) Include the multi-select CSS in your project somewhere. The CSS file is here:
[bootstrap-multiselect.css](https://raw.githubusercontent.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css)
(don't hotlink- download and host your own copy)

```html
<link rel="stylesheet" href="bootstrap-multiselect.css" type="text/css" />
```

## Supported React Versions

- React 13 users should use [react-bootstrap-multiselect v0.6.0](https://github.com/skratchdot/react-bootstrap-multiselect/tree/v0.6.0)

- React 14 users should use [react-bootstrap-multiselect v1.0.2](https://github.com/skratchdot/react-bootstrap-multiselect/tree/v1.0.2)

- React 15 users should use [react-bootstrap-multiselect v2.x.x](https://github.com/skratchdot/react-bootstrap-multiselect/)


## Note on data synchronization

In case `this.state.myData` changes from outside of multiselect component, values and checkbox state will not update automatically. If you want to sync state, you have to call `.syncData()` on multiselect like in example below.

```javascript

var React = require('react');
var Multiselect = require('react-bootstrap-multiselect');

var someReactComponent = React.createClass({
    getInitialState: function(){
        var that = this;
        $("element").on("event", function(){
            $.get("new-data-from-url", function(newData){
                that.setState(newData);

                // to sync manually do
                that.refs.myRef.syncData();
            });
        });

        return {
            myData : [{value:'One',selected:true},{value:'Two'}]
        };
    },
    render: function () {
        return (
            <Multiselect onChange={this.handleChange} ref="myRef" data={this.state.myData} multiple />
        );
    }
});
```

## Documentation

For in depth documentation, see the original
[bootstrap-multiselect](https://github.com/davidstutz/bootstrap-multiselect) project page.


## Links

- [Source Code](https://github.com/skratchdot/react-bootstrap-multiselect)
- [Changelog](https://github.com/skratchdot/react-bootstrap-multiselect/blob/master/CHANGELOG.md)
- [Live Demo](http://projects.skratchdot.com/react-bootstrap-multiselect/)
- [Original Plugin](https://github.com/davidstutz/bootstrap-multiselect)


## Similar React Components

- [react-select](https://jedwatson.github.io/react-select/)
- [react-selectize](https://www.npmjs.com/package/react-selectize)


## License

Copyright (c) 2014 skratchdot  
Uses the original [bootstrap-multiselect](https://github.com/davidstutz/bootstrap-multiselect) license.

---
_Source: https://npm.io/package/react-bootstrap-multiselect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
