Search props
The generated props of every element on Search. The guide is where they are explained; this is every prop.
disabledboolean
default: false
targetsreadonly SearchTargetName[]
The branches to ask for.
languageDataLanguage
The language the Data API answers in.
limitnumber
Per-target result cap: a whole number from 1 to 50, the range the API takes.
unitsUnitFormatOptions
The units every figure in the list is stated in: an itinerary's length and ascent, and the distance or elevation in the sentence under a place, a way or a point of interest.
A change of its length or its language asks a fresh round, since those sentences are worded as their branch lands.
wordingSearchWording
How a row's title and second line are worded for the reader, as SearchEngine takes it.
resolveLabel answers the word a wire value reads as: a category, a way's tags. units, when stated here, replaces the control's own units for the sentences this wording words, and an application states one or the other.
querystring
The query, when the application owns it. Unset, the control owns its own, whether or not onQueryChange is supplied.
viewportScopeboolean
Whether the search is restricted to the visible area, when the application owns it. Unset, the control owns its own, whether or not onViewportScopeChange is supplied.
stringsSearchControlStrings
Overrides the words this element renders, for this element only.
Folded onto whatever the provider resolved, so an override naming one key leaves the rest of the section alone. Scoped to the sections this element reads: a key it never renders is a type error rather than a silent no-op.
An on* handler suppresses the element's own default. Left unset, the element acts; set, it becomes presentational and your handler decides. The two never both fire.
onQueryChange(query: string) => void
Called with the query each keystroke and each clear asks for. With query supplied it is how the application is asked to change the value. With none it observes: the control has already written its own.
onViewportScopeChange(scoped: boolean) => void
Called with the scope a press on the checkbox asks for. With viewportScope supplied it is how the application is asked to change the value. With none it observes.
onSelect(row: SearchRow) => void
Overrides what picking a result does.
Unset, the control moves the camera onto the result and draws it with the map's setSearchHighlight, as pickTarget of @mountaya/elements/search answers. Set, it does neither and the handler decides: the assembled studio routes a pick through its own mutation surface this way while rendering this exact list.
onSearchSearchFetch
Overrides how a round reaches the API. Unset, it routes the map's own search.
onError(error: Error) => void
Called once for each branch whose request failed, with the failure.
Always an Error, as every element's onError is: an onSearch that rejects with any other value is reported as a MountayaElementsRejectionError holding that value as its cause. It reports and replaces nothing: the list still shows the branch's error line and its retry.