Q-Tree, selected prevent default
on Q-Tree, I am trying to find smart way to make my own custom selected event. I want to do some validation and if they fail, I don’t want to change selected value.
I was trying to use watcher for selected property, but I am always ending up with infinite loop.
There must be an easy way to do it, probably I just don’t understand documentation. Any Hints ?
metalsadman last edited by
@Uneasy would help if you peovide a codepen of what you’ve done so far, so peeps can take a look.
To be fair, there is not much to show, I am just trying to catch q-tree default even on selected, and handle it myself. But can’t see the way to do it.
I can make watcher and watch prop. selected, but that triggers after property is change. I rather catch it before it changes and do change myself if it’s validated.
I kind of sorted it just buy using
in q-tree. I have method that does validation, and if not valid it puts old selected value back. not quiet preventing default but seems to be working fine.