No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Q-Tree, selected prevent default

    Help
    2
    3
    165
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      Uneasy last edited by

      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 ?

      1 Reply Last reply Reply Quote 0
      • metalsadman
        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.

        1 Reply Last reply Reply Quote 0
        • U
          Uneasy last edited by Uneasy

          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.

          Update:

          I kind of sorted it just buy using

          @update:selected
          

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post