@jswork/next-abstract-checkbox

1.0.4 • Public • Published

next-abstract-checkbox

Abstract checkbox for next.

version license size download

installation

npm install -S @jswork/next-abstract-checkbox

apis

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.

Package Sidebar

Install

npm i @jswork/next-abstract-checkbox

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

10.4 kB

Total Files

5

Last publish

Collaborators

  • afeiship