-
Good day, PrimeVue team. Another question. Why doesn't my event.preventDefault() prevent text from being highlighted in the browser? Here is an example forked from a basic Tree component example. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
If you add a plain javascript event handler, you will not get any vue related data. You could either workaround it using the selectedNode: Or you could go the plain js way and add a data-key="xy" to all your nodes, then get it in the doubleclick by event.target.dataset.key; |
Beta Was this translation helpful? Give feedback.
If you add a plain javascript event handler, you will not get any vue related data.
You could either workaround it using the selectedNode:
https://stackblitz.com/edit/ucv6bt-9yub2h?file=src%2FApp.vue
Or you could go the plain js way and add a data-key="xy" to all your nodes, then get it in the doubleclick by event.target.dataset.key;