1.0.4 • Published 4 years ago
@jswork/next-abstract-checkbox v1.0.4
next-abstract-checkbox
Abstract checkbox for next.
installation
npm install -S @jswork/next-abstract-checkboxapis
| api | params | description |
|---|---|---|
| checked | - | Property: Get the list checked status. |
| indeterminate | - | Property: Get the list indeterminate status. |
| ids | - | Property: Get the all the list ids. |
| select | - | Method: Select checkbox by id. |
| selectMultiple | - | Method: Select checkbox by id list. |
| selectAll | - | Method: Select all the checkbox. |
| unSelect | - | Method: Deselct checkbox by id. |
| unSelectMultiple | - | Method: Deselct checkbox by id list. |
| unSelectAll | - | Method: Deselct all the checkbox. |
| get | - | Method: Get runtime ids list. |
usage
import NxAbstractCheckbox from '@jswork/next-abstract-checkbox';
const checkboxer = new NxAbstractCheckbox({
idKey: 'uuid',
items:[],
onChange: (e)=>{
console.log(e.target.value);
}
});
const res = checkboxer.select(['4c4e97a96dc164db144452acdf993531']);
// ['4c4e97a96dc164db144452acdf993531']license
Code released under the MIT license.