Readonly
actionClasses to remove on the actions target if any actions are checked
Readonly
actionTarget(s) that will have the actionInactive
classes removed if any actions are checked
Readonly
allAll select-all checkbox targets
Readonly
contextReadonly
itemAll item checkbox targets
Optional
lastInternal tracking of last clicked for shift+click behavior
Optional
shiftInternal tracking of whether the shift key is active for multiple selection
Static
blessingsStatic
classesStatic
outletsStatic
targetsStatic
valuesStatic
shouldOn creation, ensure that the select all checkboxes are in sync. Set up the event listeners for shift+click behavior.
Returns all valid targets (i.e. not disabled).
When an item is toggled, ensure the select all targets are kept in sync. Update the classes on the action targets to reflect the current state. If the shift key is pressed, toggle all the items between the last clicked item and the current item.
Optional
event: CustomEvent<ToggleOptions> & { params?: ToggleOptions }Toggles all item checkboxes, can be used to force check or uncheck all. If the event used to trigger this method does not have a suitable target, the first allTarget will be used to determine the current checked value.
Static
after
Adds the ability to collectively toggle a set of (non-disabled) checkboxes.
Example: - Basic usage
@example - Using groups to allow toggles to be controlled separately or together