Skip to main content
cngx-src documentation

TypeaheadController

Interface

projects/forms/select/shared/typeahead-controller.ts

Import#

import { TypeaheadController } from '@cngx/forms/select'

Description#

Public API returned from createTypeaheadController.

Index#

Instance Properties#

buffer#Signal
Readonly

Methods#

clearBuffer#void

Idempotent - clears buffer + pending timer.

matchFromIndex(char: string, currentIndex: number)

Appends char to the buffer and returns the first non-disabled option whose lowercased label starts with it. currentIndex < 0 walks inclusively from 0; currentIndex >= 0 walks exclusively with round-robin (native <select> parity). Returns null for non-printable input, disabled state, empty options, or no match. Buffer auto-clears after debounceMs.

@paramcharstring
@paramcurrentIndexnumber