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
Name | Type |
---|---|
fieldArrayName | string |
initialValue? | any |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:148
clearValidation
▸ clearValidation(fieldName
, validatorName
, code
): void
Parameters
Name | Type |
---|---|
fieldName | string |
validatorName | string |
code | ValidationCode |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:149
field
▸ field(name
, validators?
, options?
): FieldProps
Parameters
Name | Type |
---|---|
name | string |
validators? | Validator [] |
options? | FieldOptions |
Returns
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:150
getValidation
▸ getValidation(fieldName?
, touchedOnly?
): ContainerValidation
| FieldValidation
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
fieldName | string |
Returns
undefined
| T
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:152
▸ getValue<T
>(fieldName
, defaultValue
): undefined
| T
Type parameters
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
fieldName | string |
defaultValue | undefined |
Returns
undefined
| T
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:153
▸ getValue<T
>(fieldName
, defaultValue
): null
| T
Type parameters
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
fieldName | string |
defaultValue | null |
Returns
null
| T
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:154
▸ getValue<T
>(fieldName
, defaultValue
): T
Type parameters
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
fieldName | string |
defaultValue | T |
Returns
T
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:155
▸ getValue(fieldName?
, defaultValue?
): any
Parameters
Name | Type |
---|---|
fieldName? | string |
defaultValue? | any |
Returns
any
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:156
remove
▸ remove(fieldArrayName
, index
): void
Parameters
Name | Type |
---|---|
fieldArrayName | string |
index | number |
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
Name | Type |
---|---|
fieldName | string |
validatorName | string |
message? | string |
match? | boolean |
Returns
boolean
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:160
setOK
▸ setOK(fieldName
, validatorName
): boolean
Parameters
Name | Type |
---|---|
fieldName | string |
validatorName | string |
Returns
boolean
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:164
setPendingValidation
▸ setPendingValidation(fieldName
, validatorName
, pending?
): boolean
Parameters
Name | Type |
---|---|
fieldName | string |
validatorName | string |
pending? | any |
Returns
boolean
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:166
setValidation
▸ setValidation(fieldName
, validatorName
, code
, message?
): void
Parameters
Name | Type |
---|---|
fieldName | string |
validatorName | string |
code | ValidationCode |
message? | string |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:161
setValue
▸ setValue(fieldName
, value
): void
Parameters
Name | Type |
---|---|
fieldName | string |
value | any |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:162
setValues
▸ setValues(values
): void
Parameters
Name | Type |
---|---|
values | AnonymousObject <any > |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:163
setWarning
▸ setWarning(fieldName
, validatorName
, message?
, match?
): boolean
Parameters
Name | Type |
---|---|
fieldName | string |
validatorName | string |
message? | string |
match? | boolean |
Returns
boolean
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:165
submit
▸ submit(e?
): void
Parameters
Name | Type |
---|---|
e? | SyntheticEvent <Element , Event > |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/form/typings.ts:167