<GlobalSearchBox>

View as Markdown

Note: The search functionality is only available on the TalkJS Growth plan and above.

The <GlobalSearchBox> component displays a text input which lets the user enter a search query.

interface GlobalSearchBoxProps

Props passed to the GlobalSearchBox theme component.

Method Overview

cancel

Cancels the current search

setQuery

Sets a search query for the global search

Properties

A collection of objects which are passed to all ConversationList theme components.

query
: string

Marks the given message ID or conversation ID as the currently selected search result.

cancel

globalSearchBoxProps.cancel()

Cancels the current search

Returns

void

setQuery

globalSearchBoxProps.setQuery(query)

Sets a search query for the global search

Parameters

query
: string

Returns

void

Example

In the default theme, the <GlobalSearchBox> component is implemented as follows:

GlobalSearchBox.js
1// loading...