Displays a search input field, which performs a search and returns a Search Result.
search {
method = HttpMethod.GET
url = "/companies"
param = "search"
title = "Company"
emptyMessage = "No company found"
}When to use
- When there are a large number of options which cannot all be provided. For example, an address lookup.
When not to use
- When there are a small number of options which could all be provided on the step, consider using a Decision Layout with filtering instead. For example, a list of countries.
| Property | Type | Required | Description |
|---|---|---|---|
analyticsId | String | No | An optional identifier to be used in analytics tracking. |
control | String | No | Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored. |
emptyMessage | String | No | A markdown message which the client should display if the results array is empty. |
| String | No | A suggestion to the user on how they can search, or what terms are searchable.
|
| No | Represents the initial state of a search, shown before the first query executes or when the query is empty. See Search Initial State.
| |
margin | Size | No | The vertical margin to apply after this component. Defaults to md. |
method | String | Yes | The HTTP method to use for the request. |
param | String | Yes | The name of the parameter to place the search term under. If the method is GET, this will be included as a query parameter, otherwise, this will be a property of the JSON object in the request body. |
| Array<String> | No | An optional list of identifiers used to configure renderers.
|
title | String | Yes | A title to be displayed as a label for the search field. |
type | String | Yes | It must be search. |
url | String | Yes | The URL for the request. Either absolute or relative to the base URL of the flow. |
inline
Displays search results in a dropdown (Web only)
search {
method = HttpMethod.GET
url = "/companies"
param = "search"
title = "Company"
emptyMessage = "No company found"
control = Control.Layout.Search.INLINE
}