Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRegisteredElement<T>

The initialized registered element interface.

Type parameters

Hierarchy

Index

Properties

Optional checked

checked: boolean

Whether the element when checkbox or radio is checked.

Optional defaultChecked

defaultChecked: boolean

The default checked value when reset is called if applicable.

Optional defaultCheckedPersist

defaultCheckedPersist: boolean

Same as defaultChecked but some libs override defaultChecked.

Optional defaultValue

defaultValue: any

The default value used when reset is called.

Optional defaultValuePersist

defaultValuePersist: any

Same as defaultValue but some libs override defaultValue.

Optional enableBlurEvents

enableBlurEvents: boolean

Enables the blur event value/model update handler (default: true);

Optional enableChangeEvents

enableChangeEvents: boolean

Enables the change event value/model update handler (default: false);

Optional enableNativeValidation

enableNativeValidation: boolean

Whether or not native validation should be enabled, overrides main options.

Optional initChecked

initChecked: <M>(model: M) => any

The initialized checked value if any.

Type declaration

    • <M>(model: M): any
    • Type parameters

      • M: T

      Parameters

      • model: M

      Returns any

Optional initValue

initValue: <M>(model: M) => any

The initialized value if any.

Type declaration

    • <M>(model: M): any
    • Type parameters

      • M: T

      Parameters

      • model: M

      Returns any

Optional max

max: string | number

When element should be a max of this value man="5".

Optional maxLength

maxLength: string | number

When element string to be a max of this length.

Optional min

min: string | number

When element should be a min of this value min="5".

Optional minLength

minLength: string | number

When element string to be a min of this length.

Optional multiple

multiple: boolean

True when element is a select tagged with multiple="true"

name

name: KeyOf<T>

The name of the element.

Optional options

options: HTMLOptionsCollection

The HTMLOptionsCollection present when element is a select/multiple.

Optional path

path: string

The alternate model path for getting/setting field value.

Optional pattern

pattern: string | RegExp

When element should match this pattern.

Optional reinit

reinit: () => void

Re initializes the element defaults.

Type declaration

    • (): void
    • Returns void

Optional required

required: boolean

True when element is required.

Optional reset

reset: () => void

Resets the element to the default value.

Type declaration

    • (): void
    • Returns void

Optional type

type: string

The type of the element type="text".

Optional unbind

unbind: () => void

Unbinds events for the element.

Type declaration

    • (): void
    • Returns void

Optional unregister

unregister: () => void

Unbinds and unregisters element from Komo.

Type declaration

    • (): void
    • Returns void

Optional update

update: (value: any, modelValue?: any, validate?: boolean) => void

Updates the form element's state and data model value triggering all states such as touched, dirty as needed. Validation is triggered unless set to false or no validationSchema is present.

param

the element value to be set.

param

the model value to be set.

param

when true validation is triggered after set (default: true)

Type declaration

    • (value: any, modelValue?: any, validate?: boolean): void
    • Parameters

      • value: any
      • Optional modelValue: any
      • Optional validate: boolean

      Returns void

Optional validate

validate: () => PromiseStrict<Partial<T>, ErrorModel<T>>

Validates the element when validationSchema has been provided.

Type declaration

Optional validateBlur

validateBlur: boolean

Whether element should validate on blur, overrides main options.

Optional validateChange

validateChange: boolean

Whether element should validate on change overrides main options.

Optional value

value: string

The value of the element value="some_value".

Optional vanity

vanity: boolean

Inidicates this is a vanity property that is either virtual, nested or complex that does NOT directly bind to the top level props of the model.

Optional virtual

virtual: boolean

Indicates is not bound to element.

Generated using TypeDoc