The component reads your objects β you only tell it which property holds the value, the label, the icon, and so on. Anything a plain property can't express becomes a callback.
DA01 Data shapes
Member attributes map your object properties onto the control.
Quick usage
value-member,display-value-memberandicon-memberpoint at properties of each option (code,name,flaghere).- Every member has a callback counterpart β
getValueCallback,getDisplayValueCallback,getIconCallback, β¦ β for computed values. Callbacks are set as properties in JS (never attributes) and take precedence over the matching member. - An array of
[key, value]tuples is auto-detected β no members required.
getDisplayValueCallback
DA02 Form value-format
A named control auto-creates hidden inputs so it submits like any native field.
Select a few items, then inspect the DOM β hidden inputs named βstackβ appear in the light DOM and update live.
Controls
json β ["a","b"] Β· csv β a,b Β· array β repeated name[] inputs
Quick usage
- With a
name, the component writes the selection into auto-created hidden<input>s in the light DOM, so a normalFormData/ form submit picks it up. value-formatcontrols the serialization:jsonβ["html","css"],csvβhtml,css,arrayβ one repeatedstack[]input per value.
DA03 Imperative API (v2.0.0)
Drive the dropdown, the search box and scrolling from your own code.
Quick usage
Last getValue():
(not read yet) open()/close()/toggle()and theisOpengetter/setter drive the dropdown β new in v2.0.0.search(term)applies a query as if typed (without opening the dropdown),searchTextreads it back, andclearSearch()restores the full list β new in v2.0.0.scrollToIndex/scrollToValue/scrollToGroupbring an option into view (they returnfalsewhen it is filtered out) β new in v2.0.0.- See the full list on the Methods page.