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.

Parameters:
NameTypeDescription
valueObject

The numeric value to check.

paramsObject

The config object argument.

Properties
NameTypeDescription
params.minnumeric

Value must be larger than min.

params.maxnumeric

Value must be smaller than max.

Returns:

true if checks are passed.

Type: 
Boolean

(inner) numericInput(params) → {Object}

Creates a type=text input element with validation checks oninput.

Parameters:
NameTypeDescription
paramsObject

Parameter for the creation of the input element.

Properties
NameTypeAttributesDefaultDescription
params.placeholderstring<optional>
''

The placeholder for the text input.

params.data_idstring<optional>
'numeric-input'

The data id attribute for the input element.

Returns:

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.

Parameters:
NameTypeDescription
eObject

The event object from input element.

paramsObject

The config object argument.

Properties
NameTypeDescription
e.targetObject

The input element.

params.callbackObject

A callback method is required.