Skip to main content

Interface: SearchInputStore<T>

Represents the state store for an abstract search input component.

See

useSearchInputStore

Type Parameters

Type ParameterDefault type

T

string

Properties

PropertyModifierTypeDescription

events

readonly

Events<SearchInputStoreEvents<T>>

Events for the search store.

Accessors

mode

get mode(): "explicit" | "debounce" | "immediate"

Current submit mode for the input value changes in the store:

  • debounce: submit after debounce timeout;
  • immediate: submit immediately after input;
  • explicit: submit only on explicit submit action.

Returns

"explicit" | "debounce" | "immediate"

Defined in

widgets/utility/searchInput.tsx:114


value

get value(): T

Current search query value.

Returns

T

Defined in

widgets/utility/searchInput.tsx:118

Methods

change()

change(params): void

Changes the search query value with specified intent (action).

Parameters

ParameterTypeDescription

params

object

params.action

"input" | "clear" | "submit"

Change intent (action):

  • input: potentially transient change to the query value, likely to be superseded by another;
  • submit: explicit request to perform the search immediately;
  • clear: explicit or implicit request to clear the search query e.g. via specific button or if a new value is not allowed to be submitted.

params.value

T

New search query value.

Returns

void

Defined in

widgets/utility/searchInput.tsx:122