Skip to content

@serenity-is/corelib / AutoNumeric

Class: AutoNumeric

Constructors

new AutoNumeric()

new AutoNumeric(): AutoNumeric

Returns

AutoNumeric

Methods

destroy()

static destroy(input): void

method to remove settings and stop autoNumeric()

Parameters

input

HTMLInputElement

Returns

void

Defined in

src/ui/editors/autonumeric.ts:1178


getSettings()

static getSettings(input): AutoNumericOptions

returns the settings object for those who need to look under the hood

Parameters

input

HTMLInputElement

Returns

AutoNumericOptions

Defined in

src/ui/editors/autonumeric.ts:1277


getValue()

static getValue(input): string

method to get the unformatted value from a specific input field, returns a numeric value

Parameters

input

HTMLInputElement

Returns

string

Defined in

src/ui/editors/autonumeric.ts:1241


hasInstance()

static hasInstance(input): boolean

Parameters

input

HTMLInputElement

Returns

boolean

Defined in

src/ui/editors/autonumeric.ts:1281


init()

static init(input, options): void

Parameters

input

HTMLInputElement

options

AutoNumericOptions

Returns

void

Defined in

src/ui/editors/autonumeric.ts:893


setValue()

static setValue(input, valueIn): string

returns a formatted strings for "input:text" fields Uses jQuery's .val() method

Parameters

input

HTMLInputElement

valueIn

string | number

Returns

string

Defined in

src/ui/editors/autonumeric.ts:1203


updateOptions()

static updateOptions(input, options): void

method to update settings - can call as many times

Parameters

input

HTMLInputElement

options

AutoNumericOptions

Returns

void

Defined in

src/ui/editors/autonumeric.ts:1184