@serenity-is/corelib / AutoNumeric
Class: AutoNumeric
Table of contents
Constructors
Methods
Constructors
constructor
• new AutoNumeric(): AutoNumeric
Returns
Methods
destroy
▸ destroy(input
): void
method to remove settings and stop autoNumeric()
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
Returns
void
Defined in
src/ui/editors/autonumeric.ts:1178
getSettings
▸ getSettings(input
): AutoNumericOptions
returns the settings object for those who need to look under the hood
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
Returns
Defined in
src/ui/editors/autonumeric.ts:1277
getValue
▸ getValue(input
): string
method to get the unformatted value from a specific input field, returns a numeric value
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
Returns
string
Defined in
src/ui/editors/autonumeric.ts:1241
hasInstance
▸ hasInstance(input
): boolean
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
Returns
boolean
Defined in
src/ui/editors/autonumeric.ts:1281
init
▸ init(input
, options
): void
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
options |
AutoNumericOptions |
Returns
void
Defined in
src/ui/editors/autonumeric.ts:893
setValue
▸ setValue(input
, valueIn
): string
returns a formatted strings for "input:text" fields Uses jQuery's .val() method
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
valueIn |
string | number |
Returns
string
Defined in
src/ui/editors/autonumeric.ts:1203
updateOptions
▸ updateOptions(input
, options
): void
method to update settings - can call as many times
Parameters
Name | Type |
---|---|
input |
HTMLInputElement |
options |
AutoNumericOptions |
Returns
void