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

    Filter behavior in tree

    Framework
    2
    5
    191
    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.
    • T
      TJose last edited by

      I am using the tree component with filter, but the behavior is not as expected, what I do not know is if it is a bug or I am doing something wrong

      The code is in: https://codepen.io/josejachuf/pen/eYddPxV

      If I search for ‘Administrator’, it finds the node, but doesn’t show the children (Mike, Hunt)

      The behavior I expect is the one shown in this example of vuetifyjs:

      https://vuetifyjs.com/en/components/treeview/#search-and-filter

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @TJose last edited by

        @TJose

        This is as expected( well it is what it is). You’ll have to write your own filter method.

        https://quasar.dev/vue-components/tree#Example--Custom-filter

        1 Reply Last reply Reply Quote 0
        • T
          TJose last edited by

          Hi @dobbel I was testing filter-method, the problem I see is that even though I can select the node, the children are not shown. In my case the tree leaves are url

          1 Reply Last reply Reply Quote 0
          • T
            TJose last edited by

            I think the problem was in node-key which used label and some nodes have the same label, now I am changing to a numeric id and it seems to work as I want

            dobbel 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @TJose last edited by

              @TJose

              Great! Could you post the code of your custom filter function?

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