@serenity-is/corelib / AutoNumeric

Class: AutoNumeric

Defined in: src/ui/editors/autonumeric.ts:887

Constructors

Constructor

new AutoNumeric(): AutoNumeric

Returns

AutoNumeric

Properties

allowedSettingKeys

readonly static allowedSettingKeys: Set<string>

Defined in: src/ui/editors/autonumeric.ts:1281

Methods

destroy()

static destroy(input): void

Defined in: src/ui/editors/autonumeric.ts:1174

method to remove settings and stop autoNumeric()

Parameters

input

HTMLInputElement

Returns

void


getSettings()

static getSettings(input): AutoNumericOptions

Defined in: src/ui/editors/autonumeric.ts:1273

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

Parameters

input

HTMLInputElement

Returns

AutoNumericOptions


getValue()

static getValue(input): string

Defined in: src/ui/editors/autonumeric.ts:1237

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

Parameters

input

HTMLInputElement

Returns

string


hasInstance()

static hasInstance(input): boolean

Defined in: src/ui/editors/autonumeric.ts:1277

Parameters

input

HTMLInputElement

Returns

boolean


init()

static init(input, options): void

Defined in: src/ui/editors/autonumeric.ts:889

Parameters

input

HTMLInputElement

options

AutoNumericOptions

Returns

void


setValue()

static setValue(input, valueIn): string

Defined in: src/ui/editors/autonumeric.ts:1199

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

Parameters

input

HTMLInputElement

valueIn

string | number

Returns

string


updateOptions()

static updateOptions(input, options): void

Defined in: src/ui/editors/autonumeric.ts:1180

method to update settings - can call as many times

Parameters

input

HTMLInputElement

options

AutoNumericOptions

Returns

void