IdeAutocompleteDirective
class
Trigger that binds a native <input> (or <textarea>) to an
<ide-autocomplete> panel, showing filtered options in a CDK overlay.
Replaces ng-zorro's [nzAutocomplete]. It is the input's
ControlValueAccessor, so it stays compatible with formControl,
formControlName and [(ngModel)]: typing pushes the raw text to the model
(the consumer filters on it) and picking an option pushes the option's
value, mirroring ng-zorro's behaviour.
Keyboard: ArrowUp/ArrowDown move the highlight (opening the panel if closed),
Enter selects the active option, Escape closes the panel. Navigation uses
aria-activedescendant so DOM focus never leaves the input.
Properties
| Name | Type | Description |
|---|---|---|
activeOptionId (readonly) |
`WritableSignal<string | null>` |
panel? |
IdeAutocompleteComponent |
Panel to open under the input (was [nzAutocomplete]). |
panelOpen (readonly) |
WritableSignal<boolean> |
Whether the overlay is currently open. |
controlsId()
Signature
controlsId(): string | nullReturns
string | null
handleBlur()
Signature
handleBlur(): voidReturns
void
handleFocus()
Signature
handleFocus(): voidReturns
void
handleInput()
Signature
handleInput(event: Event): voidParameters
event(Event)
Returns
void
handleKeydown()
Signature
handleKeydown(event: Event): voidParameters
event(Event)
Returns
void
ngOnDestroy()
Signature
ngOnDestroy(): voidReturns
void
registerOnChange()
Signature
registerOnChange(fn: (value: unknown) => void): voidParameters
fn((value: unknown) => void) - The callback function to register
Returns
void
registerOnTouched()
Signature
registerOnTouched(fn: () => void): voidParameters
fn(() => void) - The callback function to register
Returns
void
setDisabledState()
Signature
setDisabledState(isDisabled: boolean): voidParameters
isDisabled(boolean) - The disabled status to set on the element
Returns
void
writeValue()
Signature
writeValue(value: unknown): voidParameters
value(unknown)
Returns
void