packages/eui/packages/components/eui-textarea/eui-textarea.component.ts
A form control component that provides an enhanced textarea with additional features. Supports readonly state visualization, form control integration, and state management.
OnInit
OnDestroy
DoCheck
OnChanges
ControlValueAccessor
encapsulation | ViewEncapsulation.None |
HostDirectives |
BaseStatesDirective
Inputs : euiDisabled euiDanger
|
providers |
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EuiTextareaComponent), multi: true }
|
selector | textarea[euiTextArea] |
template |
|
styleUrl | ./eui-textarea.scss |
Properties |
|
Methods |
Inputs |
Outputs |
HostBindings |
HostListeners |
Accessors |
constructor()
|
disabled |
Type : boolean | null
|
The disabled state of the textarea This can be controlled either directly or through form control binding. |
e2eAttr |
Type : string
|
Default value : 'eui-textarea'
|
id |
Type : string
|
Default value : `eui-textarea_${EuiTextareaComponent.idCounter++}`
|
Unique identifier for the textarea |
isInvalid |
Type : boolean
|
Flag indicating if the textarea is in an invalid state This can be set manually or automatically through form validation. |
readonly |
Type : any
|
The readonly state of the textarea with special styling. |
rowsChange |
Type : EventEmitter
|
Event emitter that fires when the number of text rows in the textarea changes |
class |
Type : string
|
blur | ||||||
Arguments : '$event.target.value'
|
||||||
blur(value: string)
|
||||||
Handles blur events on the textarea
Parameters :
|
input | ||||||
Arguments : '$event.target.value'
|
||||||
input(value: string)
|
||||||
Handles input changes in the textarea
Parameters :
|
Public onBlur | ||||||||
onBlur(value: string)
|
||||||||
Decorators :
@HostListener('blur', ['$event.target.value'])
|
||||||||
Handles blur events on the textarea
Parameters :
Returns :
void
|
Public onInputChange | ||||||||
onInputChange(value: string)
|
||||||||
Decorators :
@HostListener('input', ['$event.target.value'])
|
||||||||
Handles input changes in the textarea
Parameters :
Returns :
void
|
registerOnChange | ||||||||
registerOnChange(fn: () => void)
|
||||||||
Registers the callback function for change events
Parameters :
Returns :
void
|
registerOnTouched | ||||||||
registerOnTouched(fn: () => void)
|
||||||||
Registers the callback function for touched events
Parameters :
Returns :
void
|
setDisabledState | ||||||||
setDisabledState(isDisabled: boolean)
|
||||||||
Sets the disabled state of the textarea
Parameters :
Returns :
void
|
writeValue | ||||||
writeValue(obj)
|
||||||
ControlValueAccessor implementation for writing values
Parameters :
Returns :
void
|
Static idCounter |
Type : number
|
Default value : 0
|
Static counter used to generate unique IDs for textarea instances |
class |
getclass()
|
disabled | ||||||
getdisabled()
|
||||||
The disabled state of the textarea This can be controlled either directly or through form control binding.
Returns :
boolean | null
|
||||||
setdisabled(state: any)
|
||||||
Parameters :
Returns :
void
|
readonly | ||||||
getreadonly()
|
||||||
The readonly state of the textarea with special styling.
Returns :
any
|
||||||
setreadonly(state: any)
|
||||||
Parameters :
Returns :
void
|