EnInputBoolean
Preview
Props
| Name | Description | Default | Control |
|---|---|---|---|
| value | Use v-model to bind to value of the input. boolean | unknown[] | false | |
| optionValue | Required when using multiple EnInputBooleans to return an array of values when not using a checkbox group. any | null | |
| inputLabel | Sets label next to checkbox. string | "" | |
| inline | Sets 'checkbox-inline' style. boolean | false | |
| toggle | Sets the display to a more stylized toggle. boolean | false | |
| toggleSuccess | Sets the toggle style to the semantic success style. boolean | false | |
| toggleSize | Sets the size of the toggle. string | "md" | |
| trueText | Display text for inside the toggle, true side. string | "Yes" | |
| falseText | Display text for inside the toggle, false side. string | "No" | |
| 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 | |
| label | Used to describe field in error message string | null | |
| disabled | Sets the disabled attribute. boolean | null | |
| required | Sets the field to required. boolean | false | |
| 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 | |
| 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. Record<string, any> | null |
Slots
tooltip
No description
Events
blur
No description
change
No description
input
No description
Methods
| Name | Description |
|---|---|
| focus | Focuses the checkbox input element. |