### File

`packages/eui/packages/components-next/src/lib/directives/eui-maxlength.directive.ts`

### Implements

`OnInit` `AfterContentInit` `OnDestroy` `OnChanges`

### Metadata

Selector | `input[euiMaxlength], textarea[euiMaxlength], [ngModel][euiMaxlength], [formControlName][euiMaxlength]`

### Index

###### Properties

- valueChangesSubscription

###### Methods

- Public setLengthCalcFactory

###### Inputs

- euiMaxlength
- isShowMaxlength

###### Outputs

- maxLengthReached

###### HostListeners

- change
- input
- paste

### Constructor

`constructor(el: ElementRef, renderer: Renderer2, control: NgControl)`

Parameters :

Name | Type | Optional
el | `ElementRef` | No
renderer | `Renderer2` | No
control | `NgControl` | No

### Inputs

euiMaxlength
Type : `number`

isShowMaxlength
Type : `boolean`
Default value : `true`

### Outputs

maxLengthReached
Type : `EventEmitter<boolean>`

### HostListeners

change
Arguments : `'$event'`
`change(event: Event)`

input
Arguments : `'$event'`
`input(event: KeyboardEvent)`

paste
Arguments : `'$event'`
`paste(event: ClipboardEvent)`

### Methods

Public setLengthCalcFactory
`setLengthCalcFactory(fn: (input: string) => void)`

Parameters :

Name | Type | Optional
fn | `function` | No

Returns : `void`

### Properties

valueChangesSubscription
Type : `Subscription`

# result-matching ""

# No results matching ""