ItemList
A list of JSKOS items with their notation and label.
Uses ItemName. Also uses dragAndDrop and rows are draggable by default.
Props
itemsarray, requireditemPropertystring, defaultundefined—
defines which property on the objects contains the JSKOS item- by default, the objects themselves will be considered the JSKOS items
rowModeboolean, defaulttrue— if enabled, the whole row will have a background color on hover (CSS var--jskos-vue-itemList-hover-bgColor) and be clickabledraggableboolean, defaulttrue— whether the item is draggable. This will also setitemNameOptions.draggableif it's not set separately.itemNameOptionsobject — options passed along to ItemName via v-bindindicatorByUriobject — object that maps item URIs to either color strings or boolean values. If either a color ortrueis given for a particular item, an indicator will be shown to the right side of the item in the list. Note that lists use the full width of the page, so it makes sense to define a maximum width to make sure indicators can be associated with the right item.highlightByUriobject — object that maps item URIs to either color strings or boolean values. If either a color ortrueis given for a particular item, a highlight background color will be used for that item (CSS var--jskos-vue-conceptTree-selected-bgColorby default).
Slots
beforeList— shown above list.afterList— shown below list.beforeItem— shown before an item (includes parameteritem).afterItem— shown after an item (includes parameteritem).
Methods
isUriInView(uri, partial = 60)— checks whether a certain item (via its URI) is currently in view- By default, it will return
truewhen the item's element is at least 60% visible. To only returntruewhen it is fully visible, setpartialtofalse.
- By default, it will return
scrollToUri(uri, onlyIfNotInView = false)— scrolls the item list to a certain item via its URI- When
onlyIfNotInViewis given, scrolling only occurs if the item is not already visible (usingisUriInView's default).
- When
Events
selectemitted when an item or a row (ifrowModeprop istrue) is clicked. Parameter is an object with propertiesitem(containing the clicked JSKOS item) androw(containing a boolean which istruewhen the click was initiated via the row, not on the item directly).
CSS Classes and Variables
.jskos-vue-itemList— the component element.jskos-vue-itemList-item—.jskos-vue-itemList-row-selectable—--jskos-vue-itemList-hover-bgColor— row hover background color (forrowMode=true)--jskos-vue-itemList-indicator-color— default indicator color (fortruevalues)
Examples
Default, clickable = true, with indicators and slot
0 Concept no. 0
1 Concept no. 1 🚀
2 Concept no. 2
3 Concept no. 3
4 Concept no. 4
5 Concept no. 5
6 Concept no. 6
7 Concept no. 7
8 Concept no. 8
9 Concept no. 9
10 Concept no. 10 🚀
11 Concept no. 11 🚀
12 Concept no. 12 🚀
13 Concept no. 13 🚀
14 Concept no. 14 🚀
15 Concept no. 15 🚀
rowMode = false, with itemNameOptions
0 Concept no. 0
1 Concept no. 1
2 Concept no. 2
3 Concept no. 3
4 Concept no. 4