Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree view: Is there a way set if a parent node should be initially expanded? #200

Open
laurenga opened this issue Feb 2, 2018 · 2 comments
Labels

Comments

@laurenga
Copy link

laurenga commented Feb 2, 2018

I really like the tree view in the grid. Though I'd like a way to choose if the parent nodes are expanded when the grid is loaded. Is there a way to do this already? What about a way to expand/collapse the tree structure programmatically?

@bencripps
Copy link
Owner

I feel like I've seen example of this kind of behavior -- perhaps @Vanderslice may have some insight here.

@Venryx
Copy link

Venryx commented Apr 20, 2020

Found out how: just add _hideChildren: true as a field on the tree-data entry whose children should be collapsed.

Example:

const treeEntry = {
  name: "some name",
  children: [
    {name: "other name},
  ],
  _hideChildren: true
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants