Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pablofierro/react-drag-select
Drag select React component
https://github.com/pablofierro/react-drag-select
Last synced: 19 days ago
JSON representation
Drag select React component
- Host: GitHub
- URL: https://github.com/pablofierro/react-drag-select
- Owner: pablofierro
- Created: 2015-08-17T21:48:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-16T04:34:00.000Z (over 7 years ago)
- Last Synced: 2024-05-16T16:43:25.718Z (6 months ago)
- Language: JavaScript
- Homepage: http://pablofierro.github.io/react-drag-select/
- Size: 340 KB
- Stars: 255
- Watchers: 6
- Forks: 48
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Drag to Select Component
A React component that provides group and individual item selection using mouse drag or shift/ctrl + click to select individual items.
## Public Methods
##### selectItem(key, status)
Manually sets an items selection status by its id.
##### selectAll()
Select all elements in the list.
##### clearSelection()
Clears all selected items.
## Options
| Property Name | Description | Type | Default |
|-------------------|------------------------------------------------------------------------|----------|---------|
| enabled | Enables or disables the drag select behaviour | boolean | true |
| onSelectionChange | Called when the selected items change, receives item keys as argument. | function | noop |