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

    Events missing in QTree

    Framework
    3
    3
    500
    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.
    • R
      Recke last edited by Recke

      We would like to use the QTree but would need something like an onCollapse and onExpand or similar events for the tree nodes.
      There are no events for QTree described in the tutorial.

      Can anyone help?

      1 Reply Last reply Reply Quote 0
      • S
        steve last edited by

        Agreed that they seem to be missing direct Expand/collapse events, however you maybe able to utilize the expanded.sync in combination with a watcher to determine what has been expanded and collapsed during that watched event.

        1 Reply Last reply Reply Quote 0
        • s.molinari
          s.molinari last edited by s.molinari

          There are events not documented for QTree.

          Expanded has an event, depending on what is clicked, I believe.

          this.$emit('update:expanded', [])

          or

          this.$emit(`update:expanded`, target)

          There is a ticked event too.

          this.$emit(`update:ticked`, target)

          I wonder if that fires on collapsing. Hmm… `

          Give them a try.

          Taken from the source code: https://github.com/quasarframework/quasar/blob/v0.17/src/components/tree/QTree.js

          Scott

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