React Drag to Select Component

Provides group and individual item selection using mouse drag or shift/ctrl + click to select individual items.

View on Github.com

Example

Use Ctrl/Shift + click to select individual items and mouse drag to select groups, use shift and drag to append items to the selection.

Options

enabled(boolean) - Default: true

Enables or disables drag select behaviour on the component.

onSelectionChange(function) - Default: noop

Called when the selected item change, receieves item keys as argument.

Public Methods

selectItem(key, status)

Manually sets an items selection status by its id.

clearSelection()

Clears all selected items.

selectAll()

Select all elements in the list.