Closed hirisov closed 1 year ago
Never mind, got the solution:
<script>
function nodeFocus(event) {
console.log(event.id)
}
</script>
<template>
<treeview :config="treeConfig" :nodes="treeNodes" @nodeFocus="nodeFocus">
</treeview>
</template>
Hello,
from the https://codesandbox.io/s/events-7st2s?from-embed=&file=/src/App.vue:355-385 example we can see how to bind a custom handler to the nodeFocus event. But how can I get the ID of the element which triggered this event please? How do I know which node the user clicked on? :)
thanks, Gabor