-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(tree): fix has-children logic #11347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@driskull This change introduces a visual regression. We'll need to investigate further. 🥲 |
😢 seems like that property getter isn't working |
Or maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -266,6 +268,7 @@ export class TreeItem extends LitElement implements InteractiveComponent { | |||
)[0]; | |||
|
|||
this.childTree = childTree; | |||
this.requestUpdate("hasChildren"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If childTree is a state()
property, it wouldn't update the hasChildren
getter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It updates the getter, but it doesn't reflect (see example). There were a couple of ways to fix this, but an explicit update request seemed the simplest.
Related Issue: #10731
Summary
✨🚸☑️🔨✨
@driskull Thanks for the patch!