react-checkbox-handling
A HOC to manage checkboxes state
Demo
Or see it on Github Page.
Installation
npm install react-checkbox-handling
or
yarn add react-checkbox-handling
Usage
1 . Import handleCheckbox
;
2 . Pass your component to handleCheckbox
ComponentName
Configuration Options
Option | Type | Default Value | Description |
---|---|---|---|
checkboxKey | string | 'CHECK_KEY' | To provide custom key to check |
isShiftRequired | boolean | false | If shift key support is required or not |
Props Provided
These are all of the available props (and their default values) provided by hoc.
checkedItems: //Checked values void //To check all the values void //To uncheck all the values void // To update the checked item array , addItems value will be used when array is passed in checkedItem void //To update the total list of items
Example
Copy the example folder in your project and run it.