API Docs for: 1.0.0
Show:

SelectAllCheckboxGroup Class

All checkboxes can be selected and a select-all checkbox is available to check all. This check-all box is automatically changed if any other checkbox changes state.

Constructor

SelectAllCheckboxGroup

(
  • select_all_cb
  • cb_list
)

Parameters:

  • select_all_cb String | Object

    The checkbox that triggers "select all"

  • 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
)

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

getSelectAllCheckbox

() Node

Returns:

Node:

checkbox that controls "select all"

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

toggleSelectAll

()

Toggle the setting of the "select all" checkbox.