API Docs for: 1.0.0
Show:

AtMostOneCheckboxGroup Class

At most one checkbox can be selected. If one is turned on, the active one is turned off.

Constructor

AtMostOneCheckboxGroup

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

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