GitHub

DaffSearchReducerState

The main search state. Contains info about the current or most recent search operation.

import { DaffSearchReducerState } from '@daffodil/search/state'
interface DaffSearchReducerState<T extends DaffSearchResult = DaffSearchResult> {
  loading: boolean
  errors: DaffStateError[]
  results: Record<T['kind'], T['id'][]>
  recent: string[]
}

Properties

Name Type Description
loading boolean

Whether there is a pending search operation.

errors DaffStateError[]

A list of search errors, if any.

results Record<T['kind'], T['id'][]>

The result IDs of the most recent search grouped by kind.

recent string[]

A list of the most recently used search queries. Does not include incremental searches.