LimitedSelectionCheckboxesController
Purpose
To only allow a user to select a limited number of checkboxes
Actions
Action | Purpose |
---|---|
- | - |
Targets
Target | Purpose | Default |
---|---|---|
input | The 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
Class | Purpose | Default |
---|---|---|
- | - | - |
Values
Value | Type | Description | Default |
---|---|---|---|
max | Number | The maximum number of checkboxes that can be checked | - |
message (Optional) | String | The error message to show when the user selects too many checkboxes | - |
Events
Event | When | Dispatched on | event.detail |
---|---|---|---|
limited-selection-checkboxes:selection | When the user checks a checkbox successfully | the checkbox that was ticked | target : the element that the user selected |
limited-selection-checkboxes:too-many | When the user tries to select too many checkboxes | the checkbox that was ticked | target : the element that the user tried to select |
Side Effects
None