/ui/elements/chkbox
Exports the default chkbox element method as mapp.ui.elements.chkbox()
- Source
Methods
(inner) chkbox(params) → {HTMLElement}
The chkbox element method will create a label HTMLElement with a nested checkbox type input element.
The onchange method provided as params property will be executed if the checkbox input element is toggled.
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | Object | Parameter for the chkbox input element and label. |
Name | Type | Attributes | Description |
---|---|---|---|
params.label | string | The string for the chkbox label span. | |
params.data_id | string | <optional> | The string value assigned as data-id label element property. |
params.onchange | function | <optional> | The method called by the input element onchange event. |
params.disabled | boolean | <optional> | The input element is disabled. |
params.checked | boolean | <optional> | The checkbox input element is checked. |
- Source
Returns:
Chkbox label with input element.
- Type:
- HTMLElement