Skip to main content

Interface: UseForm

Properties

Form

Form: FC<FormProps>

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:151


submitting

submitting: boolean

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:168


validations

validations: AnonymousObject<FieldValidation>

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:169


values

values: any

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:170

Methods

add

add(fieldArrayName, initialValue?): void

Parameters

NameType
fieldArrayNamestring
initialValue?any

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:148


clearValidation

clearValidation(fieldName, validatorName, code): void

Parameters

NameType
fieldNamestring
validatorNamestring
codeValidationCode

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:149


field

field(name, validators?, options?): FieldProps

Parameters

NameType
namestring
validators?Validator[]
options?FieldOptions

Returns

FieldProps

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:150


getValidation

getValidation(fieldName?, touchedOnly?): ContainerValidation | FieldValidation

Parameters

NameType
fieldName?string
touchedOnly?boolean

Returns

ContainerValidation | FieldValidation

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:157


getValue

getValue<T>(fieldName): undefined | T

Type parameters

NameType
Tany

Parameters

NameType
fieldNamestring

Returns

undefined | T

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:152

getValue<T>(fieldName, defaultValue): undefined | T

Type parameters

NameType
Tany

Parameters

NameType
fieldNamestring
defaultValueundefined

Returns

undefined | T

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:153

getValue<T>(fieldName, defaultValue): null | T

Type parameters

NameType
Tany

Parameters

NameType
fieldNamestring
defaultValuenull

Returns

null | T

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:154

getValue<T>(fieldName, defaultValue): T

Type parameters

NameType
Tany

Parameters

NameType
fieldNamestring
defaultValueT

Returns

T

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:155

getValue(fieldName?, defaultValue?): any

Parameters

NameType
fieldName?string
defaultValue?any

Returns

any

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:156


remove

remove(fieldArrayName, index): void

Parameters

NameType
fieldArrayNamestring
indexnumber

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:158


reset

reset(): void

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:159


setError

setError(fieldName, validatorName, message?, match?): boolean

Parameters

NameType
fieldNamestring
validatorNamestring
message?string
match?boolean

Returns

boolean

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:160


setOK

setOK(fieldName, validatorName): boolean

Parameters

NameType
fieldNamestring
validatorNamestring

Returns

boolean

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:164


setPendingValidation

setPendingValidation(fieldName, validatorName, pending?): boolean

Parameters

NameType
fieldNamestring
validatorNamestring
pending?any

Returns

boolean

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:166


setValidation

setValidation(fieldName, validatorName, code, message?): void

Parameters

NameType
fieldNamestring
validatorNamestring
codeValidationCode
message?string

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:161


setValue

setValue(fieldName, value): void

Parameters

NameType
fieldNamestring
valueany

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:162


setValues

setValues(values): void

Parameters

NameType
valuesAnonymousObject<any>

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:163


setWarning

setWarning(fieldName, validatorName, message?, match?): boolean

Parameters

NameType
fieldNamestring
validatorNamestring
message?string
match?boolean

Returns

boolean

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:165


submit

submit(e?): void

Parameters

NameType
e?SyntheticEvent<Element, Event>

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/form/typings.ts:167