form-field/src/abstracts/form-field-control.ts
Abstract class defining the requirements for a control implemented by a FormFieldComponent instance.
Properties |
|
| Readonly clearValue |
Type : function
|
Default value : () => {...}
|
|
|
| Readonly dirty |
Type : boolean
|
Default value : false
|
|
Determines whether the control is dirty. A control is considered dirty after the user has changed its value in the UI. |
| Readonly disabled |
Type : boolean
|
Default value : false
|
|
Determines whether the control is disabled. |
| Readonly Optional formField |
Type : FormFieldComponent
|
|
Reference to the enclosing FormField if available |
| Readonly Optional hasControlContainer |
Type : boolean
|
Default value : false
|
|
Determines whether the control (Input, Date, Select, etc.) includes its own ControlContainer. Most controls are ok to use the FormField's ControlContainer, but some controls (e.g. Date) require their own ControlContainer, like Date, which has two separate input fields for date and time. true → The FormField will not display a label, read-only icon (padlock), clear button etc. false → The FormField will display a label, read-only icon, clear button etc. see DateComponent |
| Readonly hasFocus |
Type : boolean
|
Default value : false
|
|
Determines whether the control has focus. |
| hasFocusWithin |
Type : boolean
|
Default value : false
|
|
Determines whether the control or any element within has focus. Used to toggle clear button visibility. |
| Readonly hasScroll |
Type : unknown
|
Default value : signal<boolean>(false)
|
|
Determines whether the control's content has scroll offset. |
| Readonly id |
Type : string
|
Default value : ''
|
|
The control's id (the value used in the HTML element's id attribute). |
| Readonly invalid |
Type : boolean
|
Default value : false
|
|
Determines whether the control's value is invalid. |
| Readonly isEmpty |
Type : boolean
|
Default value : true
|
|
Determines whether the control contains a value. |
| Readonly required |
Type : boolean
|
Default value : false
|
|
Determines whether the control's value is required. |
| Readonly showResetUi |
Type : unknown
|
Default value : signal<boolean>(false).asReadonly()
|
|
Determines whether reset UI (tooltip and reset button) are displayed |
| Readonly stateChanges |
Type : Observable<void>
|
Default value : new Observable<void>()
|
|
Observable, pushes an empty notification whenever the state of the control changes (e.g. when it gets focus). |
| Readonly touched |
Type : boolean
|
Default value : false
|
|
Determines whether the control is touched. A control is considered touched after the user has triggered a 'blur' event on the control. |