Interface: SearchResultsProps
Props for SearchResults.
Properties
Section titled “Properties”className?
Section titled “className?”
optionalclassName?:string
Extra class names for the container.
emptyMessage?
Section titled “emptyMessage?”
optionalemptyMessage?:ReactNode
Message shown when there are no hits.
hits:
object[]
The hits to render, most relevant first.
fields
Section titled “fields”fields:
Record<string,unknown>
id:
string
index?
Section titled “index?”
optionalindex?:string
score:
number
onSelect?
Section titled “onSelect?”
optionalonSelect?: (hit) =>void
Called when a hit is clicked.
Parameters
Section titled “Parameters”fields
Section titled “fields”Record<string, unknown> = ...
string = ...
index?
Section titled “index?”string = ...
number = ...
Returns
Section titled “Returns”void
renderHit?
Section titled “renderHit?”
optionalrenderHit?: (hit) =>ReactNode
Render one hit row. Defaults to a title, fields, and a score badge.
Parameters
Section titled “Parameters”fields
Section titled “fields”Record<string, unknown> = ...
string = ...
index?
Section titled “index?”string = ...
number = ...
Returns
Section titled “Returns”ReactNode
showIndex?
Section titled “showIndex?”
optionalshowIndex?:boolean
Show each hit’s source index (useful for universal search).