Filter behavior in tree
-
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
-
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
-
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
-
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
-
Great! Could you post the code of your custom filter function?