Closed SciManJD closed 2 years ago
@SciManJD
A user may interact with the tree by either selecting (one item at a time) or checking (multiple items).
To get the currently selected item (any item that was clicked).
You can do that for now by, binding to the selectedItem
prop.
<vue3-tree-vue :items="items"
v-model:selectedItem="selectedItem" />
Meanwhile, I will quickly add a feature that allows us simply listen to those events directly.
I know this option, but I need an event. I want to deliver the selection to another component. I can catch the event with @click and I get the @event in the called function, but how to find the id of the selected item?
To do so, please update your package to version 1.0.13.
And use the onSelect event as specified in the README.
Thanks. It woks fine.
How can I get the id (that comes from the json data) of the item that was clicked? I receive the click event and probably it contains this information, but how to get it?