### File

`packages/eui/packages/components-next/src/lib/components/eui-autocomplete/eui-autocomplete.component.ts`

### Extends

`BaseDirective`

### Implements

`OnInit` `OnDestroy` `ControlValueAccessor` `OnChanges` `AfterViewInit` `DoCheck`

### Metadata

changeDetection | `ChangeDetectionStrategy.OnPush`
encapsulation | `ViewEncapsulation.None`
selector | `eui-autocomplete, input[euiAutocomplete]`
styleUrls | `./styles/_index.scss`
templateUrl | `./eui-autocomplete.component.html`

### Index

###### Properties
_addOnBlur _async _chipsLabelTruncateCount _hasChips _isChipsDragAndDrop _isChipsRemovable _isChipsSorted _isDuplicateValueAllowed _isFreeValueAllowed _isItemsSorted _isLoading _isMaxVisibleChipsOpened _maxVisibleChipsCount _readonly Public autocompleteControl autocompleteInput autocompleteInputTrigger Public autocompleteOptGroupTemplate Public autocompleteOptions Public autocompleteOptionTemplate chipList Public chips Public chipsListComponent Public distinctOptionGroups euiAutocompleteAppendContent euiAutocompletePrependContent Public groupedItems Public isDisabled matAutocomplete Public placeholderValue Public separatorKeysCodes templates
###### Methods
Public add Public addOnBlurHandler Public chipsInit Public clearInput isVisible Public onChipDragReleased Public onChipDragStarted Public onChipDropped Public onChipListFocus Public onChipRemove Public onClick Public onClose Public onKeyDownBackspace Public onOpen Public onOptionSelected Public registerOnChange Public registerOnTouched Public resetNbClick Public setDisabledState Public trackByFn Public updatePosition Public writeValue
###### Inputs
addOnBlur async autocompleteData autocompleteDataSelected chipsLabelTruncateCount chipsPosition chipsSortOrder classList dragAndDropConnectedTo dragAndDropSourceName groupBy hasChips isChipsDragAndDrop isChipsRemovable isChipsSorted isDuplicateValueAllowed isFreeValueAllowed isItemsSorted isLoading isMaxVisibleChipsOpened itemsSortOrder matching maxVisibleChipsCount panelWidth placeholder readonly toggleLinkLessLabel toggleLinkMoreLabel
###### Outputs
chipDragReleased chipDragStarted chipDropped clear closed inputChanged itemAdded itemRemoved opened selectionChanged
###### HostBindings
class
###### Accessors
hasChips async addOnBlur isFreeValueAllowed isDuplicateValueAllowed isLoading isChipsRemovable maxVisibleChipsCount chipsLabelTruncateCount isMaxVisibleChipsOpened readonly isChipsSorted isItemsSorted isChipsDragAndDrop

### Constructor

`constructor(cd: ChangeDetectorRef, _renderer: Renderer2, control: NgControl, scrollDispatcher: ScrollDispatcher)`
Parameters :
Name | Type | Optional
cd | `ChangeDetectorRef` | No
_renderer | `Renderer2` | No
control | `NgControl` | No
scrollDispatcher | `ScrollDispatcher` | No

### Inputs

addOnBlur

async

autocompleteData
Type : `EuiAutoCompleteItem[]`
Default value : `[]`

autocompleteDataSelected
Type : `EuiAutoCompleteItem[]`
Default value : `[]`

chipsLabelTruncateCount

chipsPosition
Default value : `'top'`

chipsSortOrder
Default value : `'ASC'`

classList
Type : `string`

dragAndDropConnectedTo
Type : `string[]`
Default value : `[]`

dragAndDropSourceName
Type : `string`

groupBy
Type : `string`

hasChips

isChipsDragAndDrop

isChipsRemovable

isChipsSorted

isDuplicateValueAllowed

isFreeValueAllowed

isItemsSorted

isLoading

isMaxVisibleChipsOpened

itemsSortOrder
Default value : `'ASC'`

matching
Default value : `'contains'`

maxVisibleChipsCount

panelWidth
Type : `number`

placeholder
Default value : `''`

readonly

toggleLinkLessLabel
Type : `string`
Default value : `null`

toggleLinkMoreLabel
Type : `string`
Default value : `null`

### Outputs

chipDragReleased
Type : `EventEmitter`

chipDragStarted
Type : `EventEmitter`

chipDropped
Type : `EventEmitter`

clear
Type : `EventEmitter`

closed
Type : `EventEmitter`

inputChanged
Type : `EventEmitter`

itemAdded
Type : `EventEmitter`

itemRemoved
Type : `EventEmitter`

opened
Type : `EventEmitter`

selectionChanged
Type : `EventEmitter`

### HostBindings

class

### Methods

Public add
`add(event: MatChipInputEvent)`
Parameters :
Name | Type | Optional
event | `MatChipInputEvent` | No
Returns : `void`

Public addOnBlurHandler
`addOnBlurHandler(event: FocusEvent)`
Parameters :
Name | Type | Optional
event | `FocusEvent` | No
Returns : `void`

Public chipsInit
`chipsInit(e: literal type)`
Parameters :
Name | Type | Optional
e | `literal type` | No
Returns : `void`

Public clearInput
`clearInput()`
Returns : `void`

isVisible
`isVisible(origin: ElementRef, scrollableParent: HTMLElement)`
Parameters :
Name | Type | Optional
origin | `ElementRef` | No
scrollableParent | `HTMLElement` | No
Returns : `boolean`

Public onChipDragReleased
`onChipDragReleased(e: any)`
Parameters :
Name | Type | Optional
e | `any` | No
Returns : `void`

Public onChipDragStarted
`onChipDragStarted(e: any)`
Parameters :
Name | Type | Optional
e | `any` | No
Returns : `void`

Public onChipDropped
`onChipDropped(e: any)`
Parameters :
Name | Type | Optional
e | `any` | No
Returns : `void`

Public onChipListFocus
`onChipListFocus()`
Returns : `void`

Public onChipRemove
`onChipRemove(e: literal type)`
Parameters :
Name | Type | Optional
e | `literal type` | No
Returns : `void`

Public onClick
`onClick(e: Event)`
Parameters :
Name | Type | Optional
e | `Event` | No
Returns : `void`

Public onClose
`onClose()`
Returns : `void`

Public onKeyDownBackspace
`onKeyDownBackspace()`
Returns : `void`

Public onOpen
`onOpen()`
Returns : `void`

Public onOptionSelected
`onOptionSelected(event: MatAutocompleteSelectedEvent)`
Parameters :
Name | Type | Optional
event | `MatAutocompleteSelectedEvent` | No
Returns : `void`

Public registerOnChange
`registerOnChange(fn: any)`
Parameters :
Name | Type | Optional
fn | `any` | No
Returns : `void`

Public registerOnTouched
`registerOnTouched(fn: any)`
Parameters :
Name | Type | Optional
fn | `any` | No
Returns : `void`

Public resetNbClick
`resetNbClick(e: FocusEvent)`
Parameters :
Name | Type | Optional
e | `FocusEvent` | No
Returns : `void`

Public setDisabledState
`setDisabledState(isDisabled: boolean)`
Parameters :
Name | Type | Optional
isDisabled | `boolean` | No
Returns : `void`

Public trackByFn
`trackByFn(index: number, item: EuiAutoCompleteItem)`
Parameters :
Name | Type | Optional
index | `number` | No
item | `EuiAutoCompleteItem` | No
Returns : `number`

Public updatePosition
`updatePosition()`
Returns : `void`

Public writeValue
`writeValue(value: any)`
Parameters :
Name | Type | Optional
value | `any` | No
Returns : `void`

### Properties

_addOnBlur
Default value : `false`

_async
Default value : `false`

_chipsLabelTruncateCount
Type : `null`
Default value : `null`

_hasChips
Default value : `false`

_isChipsDragAndDrop
Default value : `false`

_isChipsRemovable
Default value : `true`

_isChipsSorted
Default value : `false`

_isDuplicateValueAllowed
Default value : `false`

_isFreeValueAllowed
Default value : `true`

_isItemsSorted
Default value : `false`

_isLoading
Default value : `false`

_isMaxVisibleChipsOpened
Default value : `false`

_maxVisibleChipsCount
Type : `null`
Default value : `null`

_readonly
Default value : `false`

Public autocompleteControl
Default value : `new FormControl()`

autocompleteInput
Type : `ElementRef<HTMLInputElement>`
Decorators : `@ViewChild('autocompleteInput')`

autocompleteInputTrigger
Type : `MatAutocompleteTrigger`
Decorators : `@ViewChild('autocompleteInputTrigger', {read: MatAutocompleteTrigger})`

Public autocompleteOptGroupTemplate
Type : `TemplateRef<any>`

Public autocompleteOptions
Type : `BehaviorSubject<EuiAutoCompleteItem[]>`
Default value : `new BehaviorSubject<EuiAutoCompleteItem[]>(this.autocompleteData)`

Public autocompleteOptionTemplate
Type : `TemplateRef<any>`

chipList
Type : `EuiChipListComponent`
Decorators : `@ViewChild('chipList')`

Public chips
Type : `EuiChip[]`
Default value : `[]`

Public chipsListComponent
Type : `MatChipList`

Public distinctOptionGroups
Type : `string[]`

euiAutocompleteAppendContent
Type : `QueryList<EuiAutocompleteAppendContentDirective>`
Decorators : `@ContentChild(undefined)`

euiAutocompletePrependContent
Type : `QueryList<EuiAutocompletePrependContentDirective>`
Decorators : `@ContentChild(undefined)`

Public groupedItems
Type : `literal type`

Public isDisabled
Default value : `false`

matAutocomplete
Type : `MatAutocomplete`
Decorators : `@ViewChild('auto')`

Public placeholderValue
Type : `string`
Default value : `''`

Public separatorKeysCodes
Type : `number[]`
Default value : `[ENTER, COMMA]`

templates
Type : `QueryList<EuiTemplateDirective>`
Decorators : `@ContentChildren(EuiTemplateDirective)`

### Accessors

hasChips
set `hasChips(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

async
set `async(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

addOnBlur
set `addOnBlur(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isFreeValueAllowed
set `isFreeValueAllowed(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isDuplicateValueAllowed
set `isDuplicateValueAllowed(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isLoading
set `isLoading(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isChipsRemovable
set `isChipsRemovable(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

maxVisibleChipsCount
set `maxVisibleChipsCount(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

chipsLabelTruncateCount
set `chipsLabelTruncateCount(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isMaxVisibleChipsOpened
set `isMaxVisibleChipsOpened(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

readonly
set `readonly(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isChipsSorted
set `isChipsSorted(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isItemsSorted
set `isItemsSorted(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

isChipsDragAndDrop
set `isChipsDragAndDrop(value)`
Parameters :
Name | Optional
value | No
Returns : `void`

# result-matching ""

# No results matching ""