Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InteractiveSession

InteractiveSession creates a session based on text searches and is recommended for use in search-as-you-type style interfaces.

It resets the session if the search query value:

  • Is undefined.
  • First 3 characters have changed (i.e. from a direct replacement)
  • Cleared after being non-empty (i.e. from a delete)

Hierarchy

  • InteractiveSession

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Construts an instance of InteractiveSession.

    Parameters

    • queryLabel: string
    • session: Session

    Returns InteractiveSession

Properties

Private lastQuery

lastQuery: string = ""

Private queryLabel

queryLabel: string

Private session

session: Session

Methods

next

  • next merges new values into the session and returns tracking data to be sent with search requests. The behaviour follows the steps described in the class documentation above.

    Parameters

    Returns [Tracking, null] | [undefined, Error]

reset

  • reset(): void
  • reset resets the session instance to its empty state.

    Returns void

Generated using TypeDoc