eds-search-select

Overview

Searchable, source-agnostic select for HUGE option lists (countries, currencies, nationalities, …) — the generalised sibling of eds-kg-web-services-select.

It never talks to an external API directly. It either filters an inline options array client-side, or queries a VETTED, NAMED source through our own datasets registry (/api/v1/datasets/<source>/search), which returns the one normalised shape { items: [{label, value}], total, nextOffset }. Any messy upstream schema is flattened server-side by an adapter — the component stays dumb.

Rendering is result-capped (we render at most maxVisible rows and tell the user to keep typing) so a 5,000-item source never blows up the DOM. Remote sources are additionally bounded by the server’s page limit.

Properties

PropertyAttributeDescriptionTypeDefault
apiBaseapi-baseBase path for the datasets API.string'/api/v1'
debounceMsdebounce-msDebounce (ms) before a remote search fires.number250
disableddisabledbooleanfalse
errorerrorbooleanfalse
errorMessageerror-messagestringundefined
hinthintstringundefined
labellabelstringundefined
limitlimitServer page size for remote sources.number50
maxVisiblemax-visibleMax rows rendered at once (DOM cap).number100
messagemessagestringundefined
multiplemultipleAllow selecting multiple values — selections render as removable tags.booleanfalse
name (required)namestringundefined
optionsoptionsInline options: an array or a JSON string of [{label, value}].Option[] | stringundefined
placeholderplaceholderstring'Search…'
requiredrequiredbooleanfalse
searchParamsearch-paramQuery param name the search term is sent as.string'q'
sourcesourceA vetted registry source key, e.g. “countries” / “currencies”.stringundefined
valuevalueSelected value. A single value string in single-select mode, or an array of values in multi-select mode. v-model friendly.string | string[]undefined

Events

EventDescriptionType
edschangeCustomEvent<{ value: string | boolean | string[]; }>
edsinputCustomEvent<{ value: string | boolean | string[]; }>

Dependencies

Used by

Depends on

Graph

graph TD;
  eds-search-select --> eds-input-label
  eds-search-select --> eds-icon-wrapper
  eds-search-select --> eds-input-footer
  eds-input-footer --> eds-icon-wrapper
  eds-input-footer --> eds-link
  eds-link --> eds-icon-wrapper
  eds-form --> eds-search-select
  style eds-search-select fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS