Search

General purpose search with optional rich results rendered from item templates

Contents

No inputs set

By default all search fields are rounded

If the search field acts more of an input and just so happens you need to search something first, prefer using square corners, which looks similar to other inputs.

Inputs in Round corners
displayResults ?: boolean = true
displayResultsWithEmptyInput ?: boolean = false

Show options when the user has not entered anything

roundCorners ?: boolean = true
scrollableSearchResults ?: boolean = false

Limits search results' container height and makes it scrollable.

showIcon ?: boolean = true
Also set in this example
itemTemplates ?: { [type: string]: TemplateRef<any>; } = {}
placeholder ?: any = $localize`Search`
searchResults ?: readonly SearchItem[] = []
Outputs
clear ?: any = new EventEmitter<void>()
expandedChange ?: any = new EventEmitter<boolean>()

Exposes the expanded/collapsed status of the expandable search bar.

onBlur ?: any = new EventEmitter<void>()
onFocus ?: any = new EventEmitter<void>()
overlayClose ?: any = new EventEmitter<void>()
query ?: any = new EventEmitter<string>()
select ?: any = new EventEmitter<SearchItem>()
submit ?: any = new EventEmitter<void>()