Skip to content

Tree.Expanded is not respected #1153

@kindermannhubert

Description

@kindermannhubert

Information

  • OS: Windows
  • Version: 0.46.1-preview.0.5
  • Terminal: cmd.exe

Describe the bug
The following code:

var root = new Tree("root") { Expanded = false };
root.AddNode("node1");
root.AddNode("node2");
AnsiConsole.Render(root);

has the same behavior as if Expanded is set to true (which is default).

To Reproduce
Use provided code.

Expected behavior
Nodes node1 and node2 should not be rendered. Only root should be visible.

Screenshots
image


Please upvote 👍 this issue if you are interested in it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions