API Docs for: 1.0.0
Show:

CheckboxGroup Class

Base class for enforcing constraints on groups of checkboxes.

Derived classes must override enforceConstraints().

Constructor

CheckboxGroup

(
  • cb_list
)

Parameters:

  • cb_list String | Node | NodeList

    The list of checkboxes to manage

Methods

allChecked

() Boolean

Returns:

Boolean:

true if all checkboxes are checked

allDisabled

() Boolean

Returns:

Boolean:

true if all checkboxes are disabled

allUnchecked

() Boolean

Returns:

Boolean:

true if all checkboxes are unchecked

checkboxChanged

(
  • cb
)

Call this if you modify the checkbox programmatically, since that will not fire a click event.

Parameters:

  • cb Node | String

    checkbox that was modified

enforceConstraints

(
  • cb_list
  • index
)

Derived classes must override this function to implement the desired behavior.

Parameters:

  • cb_list String | Object | Array

    The list of checkboxes

  • index Int

    The index of the checkbox that changed

getCheckboxList

() NodeList

Returns:

NodeList:

List of managed checkboxes

splice

(
  • start
  • delete_count
  • cb_list
)

Same functionality as Array.splice(). Operates on the list of managed checkboxes.

Parameters:

  • start Int

    Insertion index

  • delete_count Int

    Number of items to remove, starting from start

  • cb_list String | Node | NodeList

    The list of checkboxes to insert at start