Form data components

Form data components

Class: FormDataComponent

Properties

Name Type Description

elementRef

property

Name of the column

Inputs

Name Since Description Default

appearance

legacy | standard | fill | outline

Indicates which of the mat-form-field different appearance variants will be used.

legacy

async-validators

AsyncValidatorFn[]

Array of custom async validators to apply to the component value. Each element must be a Angular AsyncValidatorFn

[]

attr

string

Field identifier. Registry property if component is inside a form.

automatic-binding

no | false | yes | true

Indicates whether or not the component will bind its value to its attr when located inside a form

yes

automatic-registering

no | false | yes | true

Indicates whether or not the component will register itself (using its attr) when located inside a form

yes

clear-button

no | false | yes | true

Indicates whether or not to show the clear button

no

data

Manually setted component value

enabled

no | false | yes | true

Indicates whether or not the field is enabled

yes

float-label

always | never | auto

Indicates which of the mat-form-field different float label variants will be used.

auto

hide-required-marker

no | false | yes | true

Whether the required marker should be hidden

no

label

string

Field label

attr input

label-visible

no | false | yes | true

Whether the label should be shown

yes

placeholder

string

Field placeholder

read-only

no | false | yes | true

Indicates whether the input value is modifiable or not. This attribute may be ignored depending on the value of the editable-detail attribute of its parent o-form component

no

required

no | false | yes | true

Indicates whether or not the field is required

no

select-all-on-click

no | false | yes | true

Select all the text when clicking on an input

no

sql-type

string

Data type according to Java standard. See SQL Types

OTHER

tooltip

string

Field tooltip text

tooltip-position

before | after | above | below | left | right

Field tooltip position

below

tooltip-show-delay

number

Field tooltip display time

500

validators

ValidatorFn[]

Array of custom validators to apply to the component value. Each element must be a Angular ValidatorFn

[]

validators-errors

ErrorData[]

Array of custom validators error information (synchronous or asynchronous). Each element must have a ‘name’ property corresponding to the validator error name and a ‘text’ property that will be displayed when the component value does not satisfy the validator condition

[]

width

string

Indicates the width of input component in pixels (px) or percentage (%)

* required inputs.

Outputs

Name Since Description

onBlur

Event triggered when component loses the focus

onChange

Event triggered when component value changes.

onFocus

Event triggered when component gains the focus

onValueChange

EventEmitter<OValueChangeEvent>

Event triggered when component value changes, eventobject emitted by OValueChangeEvent object.

Methods

getActiveOErrors
Returns a array containing the customized error values that the component has. Each element has a 'name' and a 'text' properties
Returns
IErrorData[]
getFormControl
Returns the form control of the input.
Returns
FormControl
getFormGroup
Returns the form group of the input.
Returns
FormControl
getSQLType
Returns the code of sqltype of the input.
Returns
number
getSelectedItems
Returns the selected items of the component.
Returns
any[]
getValue
Returns the selected items of the component.
Returns
any
hasError
Set the selected items of the component.
Parameters
string
Returns
boolean
isAutomaticBinding
Returns the input is automatic binding.
Returns
boolean
isAutomaticRegistering
Returns the input is automatic registering.
Returns
boolean
setSelectedItems
Set the selected items of the component.
Parameters
any[]
setValue
Set value of the component.
Parameters
any

Form data components

Class: OValueChangeEvent

Inputs

Name Since Description Default

newValue

The new value for the target.

oldValue

The old value for the target.

target

Reference to the input.

type

0 | 1

The value is 0 if the change is emitted by the user or 1 if change is emitted by programmaticñ

Updated: