Hide() child in lipgloss/tree #452
Unanswered
marcotrosi
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hey looking into this - I think there are some bugs that you've pointed out here that we will work on. Thanks for sharing this, it'll be super helpful while we work on fixing this |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello reader,
Question 1
TLDR
how can I hide a child/leaf in a tree without using Root()?
Long question
I have the following code, where I'm trying to hide the second child.
I understand why it doesn't work, because Child() returns T and not the second child.
I can work my way around by using another Root()
Okay, but I'm still wondering how to hide that second child without using another Root node. Is it even possible?
I then tried to get the second child and hide it.
Which gives the following error message
T.Children().At(1).Hide undefined (type tree.Node has no field or method Hide)
Question 2
I have these 4 code snippets with corresponding output ...
As you can see in snippet number 3 the line is not drawn correctly, it should look like the output of snippet number 1. Is this something I have to take care of myself, or do I have to live with it, or can this safely be considered a bug?
Thank you very much for your support
--marco
Beta Was this translation helpful? Give feedback.
All reactions