mapp.ui.elements.numericInput()
Exports the numericInput elements method.
Methods
(inner) numericChecks(value, params) → {Boolean}
The numericChecks method checks whether a provided numeric value is a number, larger than params.min, and smaller than params.max.
Name | Type | Description |
---|---|---|
value | Object | The numeric value to check. |
params | Object | The config object argument. |
Name | Type | Description |
---|---|---|
params.min | numeric | Value must be larger than min. |
params.max | numeric | Value must be smaller than max. |
true if checks are passed.
- Type:
- Boolean
(inner) numericInput(params) → {Object}
Creates a type=text input element with validation checks oninput.
Name | Type | Description |
---|---|---|
params | Object | Parameter for the creation of the input element. |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params.placeholder | string | <optional> | '' | The placeholder for the text input. |
params.data_id | string | <optional> | 'numeric-input' | The data id attribute for the input element. |
HTML input element
- Type:
- Object
(inner) oninput(e, params)
Creates a type=text input element with validation checks for numeric values.
The value of an associated sliderElement will be updated if validated.
Name | Type | Description |
---|---|---|
e | Object | The event object from input element. |
params | Object | The config object argument. |
Name | Type | Description |
---|---|---|
e.target | Object | The input element. |
params.callback | Object | A callback method is required. |