# react-duallist

> A React based searchable, sortable and fully customizable dual list.

Latest version **1.1.6** (published 2018-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-duallist
pnpm add react-duallist
yarn add react-duallist
bun add react-duallist
```

## 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 | 1.1.6 |
| Published | 2018-10-04 |
| First published | 2018-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jyotirmay Banerjee |
| Maintainers | jyoti505 |
| Keywords | React, dual list, searchable, sortable, component, multiple, multiselect, listbox, custom icons, no dependecies |

## Links

- npm: https://www.npmjs.com/package/react-duallist
- Repository: https://github.com/jyotirmaybanerjee/react-duallist
- Homepage: https://rawgit.com/jyotirmaybanerjee/react-duallist/master/example/examples.html
- Issues: https://github.com/jyotirmaybanerjee/react-duallist/issues
- npm.io page: https://npm.io/package/react-duallist

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2018-10-04
- 1.1.5 — 2018-06-29
- 1.1.4 — 2018-06-28
- 1.1.3 — 2018-05-11
- 1.1.2 — 2018-05-10
- 1.1.1 — 2018-04-16
- 1.1.0 — 2018-04-09
- 1.0.0 — 2018-04-07
- 0.0.9 — 2018-04-07
- 0.0.8 — 2018-04-07
- 0.0.7 — 2018-04-06
- 0.0.6 — 2018-04-06
- 0.0.5 — 2018-04-06
- 0.0.4 — 2018-04-06
- 0.0.3 — 2018-04-06
- … 2 more at https://npm.io/package/react-duallist/versions

## README

react-duallist
=========
A React based searchable, sortable and fully customizable dual list.

[Demo](https://rawgit.com/jyotirmaybanerjee/react-duallist/master/example/examples.html)

## Install

  npm install react-duallist --save

  or

  yarn add react-duallist


## Use

  ```
  import Duallist from 'react-duallist';

  import 'react-duallist/lib/react_duallist.[css|less|scss|sass]'
  ```

  ```jsx
    <Duallist
      available={available}
      selected={selected}
      onSelect={this.onSelect}
    />
  ```

## options

| Option  | Description | Default Value | Required |
| ------------- | ------------- | ------------- | ------------- |
| available  | List of available options, will appear in the left box  |    | true  |
| selected  | List of selected options, will appear in the right box  |    | true, atleast need to pass an empty array  |
| onSelect  | A callback to handle the change in the selected list  |    | true  |
| leftLabel  | A header for the left (available) list  | Available  |    |
| rightLabel  | A header for the right (selected) list  | Selected  |    |
| sortable  | A false value will hide the reorder buttons on the right  | true  |    |
| searchable  | A false value will hide the search field on the top  | true  |    |
| moveLeftIcon  | fontawesome icons or icon of your choice  | <  |    |
| moveAllLeftIcon  | fontawesome icons or icon of your choice  | <<  |    |
| moveRightIcon  | fontawesome icons or icon of your choice  | >  |    |
| moveAllRightIcon  | fontawesome icons or icon of your choice  | >>  |    |
| moveUpIcon  | fontawesome icons or icon of your choice  | ￪  |    |
| moveTopIcon  | fontawesome icons or icon of your choice  | ⇈  |    |
| moveDownIcon  | fontawesome icons or icon of your choice  | ￬  |    |
| moveBottomIcon  | fontawesome icons or icon of your choice  | ⇊  |    |


## Tests

  npm test

  or yarn test

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.

## Release History

* 0.0.1 - Duallist implementations
* 0.0.2 - Support sorting on the 'selected' list
* 0.0.3 - Hide/show search bar
* 0.0.4 - Add example page
* 0.0.5 - Add Custom icon support
* 1.0.0 - Support React 16
* 1.1.0 - Some style changes
* 1.1.1 - Rename lib directory
* 1.1.2 - Handle when empty arrays are passed
* 1.1.4 - OnSelect handlers for the left and right lists.
* 1.1.5 - [Fix for issue #1] Allow empty 'selected' array

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