Menu

Hide siblings

Alexandre
2021-05-04
2021-05-04
  • Alexandre

    Alexandre - 2021-05-04

    Hi,

    It seems it could be useful to be able to hide siblings. Is this already possible?

    For example if you have

    Book
    -- Chapter1
    -- Chapter2
    -- Chapter3
    -- Chapter 4
    etc

    And have many books like these but only 1 chapter is expanded by book, it would make a lot of closed Chapter nodes for nothing. If we could only see the nodes expanded and the closed one if we could make them invisible somehow..
    Any ideas?

    Thanks.

     
  • Edo Frohlich

    Edo Frohlich - 2021-05-04

    In such cases I usually select the nodes I like to see (in your example, Chapter 3 in each of the different Books nodes) and then I apply the 'currently selected nodes' filter.
    And play with the 'show descendants' and 'show ancestors' buttons.

    I created also an additional script filter that shows the selected node and its descendant, but allows to do additional filters on them by using the 'And filter'

    here is the script:

    def nodo = c.selected
    return node.pathToRoot.contains(nodo)
    

    I use it rarely, but when needed, it's very helpful

     
    • Alexandre

      Alexandre - 2021-05-04

      "Filter selected nodes" will do after selecting the nodes to see. So instead of hiding nodes we would show only those we want. I rarely used this button and usually it was on 1 node at a time, so I didn't think to use it on multiple nodes.

      Thanks again Edo!

       
      👍
      1