OnsNumberInput

open class OnsNumberInput(value: Number? = null, min: Number? = null, max: Number? = null, step: Number = DEFAULT_STEP, placeholder: String? = null, floatLabel: Boolean? = null, inputId: String? = null, className: String? = null, init: OnsNumberInput.() -> Unit? = null)

OnsenUI number input component.

Parameters

value

number input value

min

minimal value

max

maximal value

step

step value (default 1)

placeholder

the placeholder for the number input

floatLabel

whether the placeholder will be animated in Material Design

inputId

the ID of the input element

className

CSS class names

init

an initializer extension function

Constructors

Link copied to clipboard
constructor(value: Number? = null, min: Number? = null, max: Number? = null, step: Number = DEFAULT_STEP, placeholder: String? = null, floatLabel: Boolean? = null, inputId: String? = null, className: String? = null, init: OnsNumberInput.() -> Unit? = null)

Creates a number input component.

Properties

Link copied to clipboard
var autocomplete: <Error class: unknown class>?

Specifies the auto complete mode of the input element.

Link copied to clipboard

Determines if the number input is automatically focused.

Link copied to clipboard
open var disabled: <Error class: unknown class>

Determines if the field is disabled.

Link copied to clipboard

Whether the placeholder will be animated in Material Design.

Link copied to clipboard

The ID of the input element.

Link copied to clipboard
var max: <Error class: unknown class>

Maximal value.

Link copied to clipboard
var min: <Error class: unknown class>

Minimal value.

Link copied to clipboard

A modifier attribute to specify custom styles.

Link copied to clipboard
open var name: String?

The name attribute of the generated HTML input element.

Link copied to clipboard
var placeholder: <Error class: unknown class>

The placeholder for the number input.

Link copied to clipboard

Determines if the number input is read-only.

Link copied to clipboard
open var size: <Error class: unknown class>?

The size of the input.

Link copied to clipboard
var startValue: <Error class: unknown class>

The value attribute of the generated HTML input element.

Link copied to clipboard
var step: <Error class: unknown class>

Step value.

Link copied to clipboard
open var validationStatus: <Error class: unknown class>?

The validation status of the input.

Link copied to clipboard
open var value: <Error class: unknown class>

Number input value.

Functions

Link copied to clipboard
open fun afterInsert(node: <Error class: unknown class>)
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun getState(): Number?
Link copied to clipboard

Returns the value of the number input as a String.

Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard
open fun setState(state: Number?)
Link copied to clipboard
open fun subscribe(observer: (Number?) -> Unit): () -> Unit