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 with hyperlink

    Framework
    2
    5
    1686
    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.
    • S
      Stanley last edited by

      Is that possible that Q-Tree with hyperlink?
      I want to design the layout like this, left part is a tree menu, when user click tree leaf node, the right part will show related content. The Q-Tree has the property “selected”, but still not strong.

      1 Reply Last reply Reply Quote 0
      • C
        chbarr last edited by

        I think you can change route when a tree leaf node is clicked and the right part is your router-view.
        And I think with some css you can style the selected node

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

          Yes, I agree with you. So I did it like this, when a tree leaf node is clicked, QTree “selected” property is filled, then it can navigate by router. If I click the same node again, as you know, the node is deselected and QTree “selected” property is empty now. But at this time, it cannot navigate, right? I want the tree can navigate everytime when I click the node, is that possible? Thanks a lot for you help!

          1 Reply Last reply Reply Quote 0
          • C
            chbarr last edited by

            I understand.
            There’s one thing not documented. You can use handler on a node. See it in jsfiddle: https://jsfiddle.net/s8pqkq8d/21/

            S 1 Reply Last reply Reply Quote 0
            • S
              Stanley @chbarr last edited by

              @chbarr Thanks a lot! But considering the user experience, I think there is still something to be improved, as the demo in the link, when the cursor focus on the node, the cursor should change to “hand”. I tried to use tree property “selected.sync” and it becomes better, but as you know, when click the tree node secondly, the node is deselected.
              Hopefully, it can be improved in the future.

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