Appearance
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 set
itemNameOptions.draggableif it's not set separately.
- This will also set
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 or
trueis 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.
- If either a color or
highlightByUriobject
object that maps item URIs to either color strings or boolean values- If either a color or
trueis given for a particular item, a highlight background color will be used for that item (CSS var--jskos-vue-conceptTree-selected-bgColorby default).
- If either a color or
Slots
beforeList: Content shown above list.afterList: Content shown below list.beforeItem: Content shown before an item (includes parameteritem).afterItem: Content 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
select- Emitted when an item or a row (if
rowModeprop istrue) is clicked. - Parameter is an object with properties
item(containing the clicked JSKOS item) androw(containing a boolean which istruewhen the click was initiated via the row, not on the item directly).
- Emitted when an item or a row (if
Layout
--jskos-vue-itemList-hover-bgColor- row hover background color (forrowMode=true)- default:
#fdbd58aa
- default:
--jskos-vue-itemList-indicator-color- default indicator color (fortruevalues)- default:
green
- default:
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