Skip to content

How to set a default path of nodes to be expanded? #441

@sockthedev

Description

@sockthedev

Howdy, thanks for this fantastic library. I'm building a fun little project and this will become a core mechanism of interaction for the users. I'd be happy to share when I launch it.

I have one question, sorry I tried parsing the docs but the answer wasn't explicitly obvious.

I would like to load the tree with a specific path expanded (everything else collapsed).

For example, given the following tree;

             A
           /   \
          /     \
         B       E
        / \
       /   \
      C     D

I would like to be able to set the path of A -> B -> D to be be visible/expanded when the tree initially loads;

             A
           /   
          /     
         B 
          \
           \
            D

Is this possible? I'm happy to utilise an imperative API is there is one suitably available.

Thanks again x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions