Skip to main content

LimitedSelectionCheckboxesController

Purpose

To only allow a user to select a limited number of checkboxes

Actions

ActionPurpose
--

Targets

TargetPurposeDefault
inputThe checkbox inputs to be included in the restricted selection-
error (Optional)Where to show an error message when the user tries to select too many inputs-

Classes

ClassPurposeDefault
---

Values

ValueTypeDescriptionDefault
maxNumberThe maximum number of checkboxes that can be checked-
message (Optional)StringThe error message to show when the user selects too many checkboxes-

Events

EventWhenDispatched onevent.detail
limited-selection-checkboxes:selectionWhen the user checks a checkbox successfullythe checkbox that was tickedtarget: the element that the user selected
limited-selection-checkboxes:too-manyWhen the user tries to select too many checkboxesthe checkbox that was tickedtarget: the element that the user tried to select

Side Effects

None

How to Use