EnInputCheckboxGroup
Preview
Props
| Name | Description | Default | Control |
|---|---|---|---|
| value | Used for a raw value passed into the input. string | number | unknown | |
| label | Used to describe field in error message string | null | |
| tooltip | Text for an info tooltip rendered after the group's own label. string | "" | |
| tooltipProps | Extra props for the object | {…} | complex object |
| popover | Shows boolean | false | |
| inline | Sets 'checkbox-inline' style, makes checkboxes align horizontally. boolean | false | |
| horizontal | Sets the group to display horizontally. boolean | false | |
| labelClass | Sets the class used for the label column when using horizontal layout. string | "col-md-3" | |
| inputClass | Sets the class used for the input column when using horizontal layout. string | "col-md-9" | |
| showRequired | Displays asterisk (*) next to the group label. boolean | true | |
| styled | Sets an alternate style for the checkboxes. boolean | false | |
| name | Sets name attribute for the input. Required for proper form handling. string | null | |
| id | Sets id attribute for input. If left blank, it will default to the string | null | |
| placeholder | Sets the placeholder value. string | null | |
| disabled | Sets the disabled attribute. boolean | null | |
| required | Sets the field to required. boolean | false | |
| critical | Flags the field as critical. Critical is not required: a required field blocks saving, while a critical field saves fine empty but blocks something later, such as activating or completing a record. Use it for "you will need this before you can finish", not "you must enter this now". While the field is empty, the control takes the boolean | false | |
| locked | Locks the field: disables the control and marks it with a lock icon. Text-like controls show the
lock inside the input, in the spot a select keeps its arrow. Option groups, booleans and file
inputs have no box to put it in, so they show it beside the label of a surrounding boolean | false | |
| lockedMessage | Why the field is locked, for example "Locked while payroll is open". Shown as a tooltip when the
pointer rests on the locked control, and on the lock icon beside the label, which becomes
focusable so keyboard users can reach the text (the disabled control itself cannot take focus).
Rendered through en-components' string | "" | |
| typeCast | Used to specifically validate different types. string | "string" | |
| mode | Sets when and how often validation occurs. TODO: create docs for modes string | "eager" | |
| displayOnly | Displays the value of the field in a span element, instead of as an input. boolean | false | |
| emptyValue | What a boolean | string | false | |
| rules | A pipe separated string of validation rules for the field. View validation rules string | "" | |
| renderInForm | Prevents a field from being rendered at all when used in the boolean | function | true | |
| renderInTable | Prevents a field from generating a column/heading in the boolean | function | true | |
| customMessages | Provide a custom error messages by rule. Should be an object with keys that match the rule name and value being a string of the message to display. object | null | complex object |
| options | Array of option objects with label and value keys. array | unknown | complex object |
| valueKey | Sets a different key to use to retrieve the value from the options passed to the component. string | "value" | |
| labelKey | Sets a different key to use to retrieve the label from the options passed to the component. string | "label" | |
| labelColors | Sets default colors for option labels in displayOnly mode array | unknown | complex object |
| emptyOption | An entry for "nothing selected", prepended to the list. The prompt is presentation, not data: it exists so the control has an unselected state,
which is the component's business rather than the server's. Supplying it here keeps it out
of Pass object | string | null | |
| optionsKey | Sets a different key to use to retrieve the options from the option groups passed to the component. string | "options" |
Slots
display
No description
Variables
| Name | Type | Description |
|---|---|---|
selections | unknown | — |
Events
blur
No description
change
No description
input
No description
Methods
| Name | Description |
|---|---|
| focus | Focuses a checkbox input element in the group. |
Types
Option -
ObjectProperties available when using an input that accepts options.
| Name | Type | Description |
|---|---|---|
label | string | Display text for the option. Note: first letter is case insensitive meaning it will also try |
value | stringnumber | Value of the option that will be emitted when selected. Note: first letter is case insensitive meaning it will also try |
disabled | boolean | Sets the option to disabled so that it cannot be selected or deselected. |
labelColor | string | Overrides the default label color when using pills and display only, if supported. |
tooltip | string | Adds a tooltip next to the option if supported by the input (radio, checkbox, boolean). |
options | array | Array of Options when needing to use option groups. |
Related Components
- EnInputCheckbox — The individual checkbox this group renders. Only use it directly for custom layouts the group can't express.
- EnInputBoolean — For a single true/false choice instead of a set.