Skip to main content

search-combobox

Searchable dropdown with async search results.

Attributes

AttributeTypeDescriptionSupport JS expressions
data-placeholderstringPlaceholder text for search input
data-valuesfunctionSearch function (receives query, returns results)
data-defaultfunctionFunction returning default value

Output Value

string - Selected value, typically an ID returned by the search provider

Example

Manifest:

"modules": [
    "modules/CitySearch.mjs"
]

HTML:

<meta name="x-icue-property" content="city"
      data-label="tr('City')"
      data-type="search-combobox"
      data-values="CitySearch.search"
      data-default="CitySearch.getDefault"
      data-placeholder="tr('Search city...')">

Usage in JavaScript

console.log(city); // "12345" (selected city ID)

Reference Implementation

See the Weather widget for a complete implementation: <<iCUE install dir>>/widgets/Weather/