Appearance
ItemSelect
Pick one item at a time (JSKOS concepts, schemes, languages, …) via:
- a typeahead dropdown (via ItemSuggest)
- optional hierarchy browsing (via ConceptTree)
ItemSelect does not keep a selection list. It only emits the picked item. If you want to show/edit a list, combine it with ItemSelected in your app.
Props
optionsarray, default[]
local options (small static lists like languages).searchfunction
remote search function in OpenSearch Suggest format (see ItemSuggest). Default is based onoptions(if set) or onregistry.suggest(if bothregistryandschemeare set).resolvefunction
optional async resolver to turn a selected URI into a full JSKOS item object
when it is not available in the internal suggestion cache.
Default is based onoptions(if set) or onregistry.getConcepts(if available).minCharsnumber, default1
minimum query length before searching (applies tooptionsandsearch).registryobject, defaultnull
Registry to load concepts fromschemeobject, defaultnull
Concept Scheme to load concepts from. Must have fieldurioridentifierat least.treeConceptsarray
top concepts for theConceptTreebrowser below the input.
Default is loaded viaregistry.getTopif bothregistryandschemeare set.placeholderstring, default"Search…"
input placeholder.
See concept loading of ConceptTree for background information on registry and scheme.
Slots
The default slot is shown between input field and hierarchy.
Events
select— emitted when an item is picked (via typeahead or tree).
Payload is usually a normalized item. If resolving is not possible it may fall back to{ uri }.
Behavior notes
Before emitting, items are normalized:
__labelis derived from__label/prefLabel(fallback:uri)prefLabel.undis ensurednotationis preserved; otherwise tries to derive DDC notation from/class/<notation>/URIs
ItemSuggest emits only { uri }. ItemSelect caches the current suggestion result set so it can emit a full object when available. If the URI is not in the cache and you provided resolve, it calls resolve(uri) and emits the returned item (normalized).
After selecting via typeahead the tree is synced via conceptTree.navigateToUri(concept, { select: false }) (best effort).
Methods
Via component ref (ref="itemSelect"):
focus— focuses the internalItemSuggestinput.
Layout
.jskos-vue-itemSelect.jskos-vue-itemSelect-tree
See ItemSuggest for styling of dropdown and ConceptTree for styling of tree.