new SelectAllListController()
- Description:
INTERNAL CODE DOCUMENTATION COMPLETE
Select All Switch List Controller
A sophisticated Stimulus controller that provides automatic "Select All" functionality for Bootstrap form-switch checkbox lists. Creates and manages a master checkbox that controls all individual checkboxes with bidirectional synchronization.
Key Features:
- Automatic "Select All" header checkbox generation
- Bidirectional synchronization between master and individual checkboxes
- Bootstrap form-switch styling consistency
- Dynamic checkbox discovery and event management
- Accessibility support with ARIA labels
- Automatic state management for partial selections
- Source:
Extends
- Controller
Members
allCheckboxes
- Description:
Collection of all checkboxes in the list, including the master checkbox. @type {NodeList}
- Source:
Collection of all checkboxes in the list, including the master checkbox. @type {NodeList}
Methods
connect()
- Description:
Initialize controller and generate Select All functionality Creates master checkbox, sets up event listeners, and establishes synchronization
- Source:
updateSelectAll(event)
- Description:
Handle checkbox state changes and maintain synchronization Manages bidirectional relationship between master and individual checkboxes Updates master checkbox state based on individual selections
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
Event | The change event from any checkbox in the list |