@aracna/core - v1.5.0
    Preparing search index...

    Class Typeahead<T>

    The Typeahead class is a state and options holder for the typeahead function.

    Aracna Reference

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chunks: string[]

    The chunks that make up the query string.

    debounceTime: number

    The debounce time.

    items: T[]

    The items to search.

    The key of the instance.

    maxListeners: number
    predicate: TypeaheadPredicate<T>

    The predicate function.

    Methods

    • Pushes chunks to the chunks array.

      Parameters

      • ...chunks: string[]

      Returns this

    • Searches the items for a match and emits the match event if a match is found.

      Returns this

    • Sets the chunks.

      Parameters

      • chunks: string[] | undefined

      Returns this

    • Sets the debounce time.

      Parameters

      • debounceTime: number | undefined

      Returns this