-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat(design)!: add tree renderMode #2777
Conversation
BREAKING CHANGE: Previously, the now-named renderMode "not-in-dom" was the default. This is no longer the case. If one was rendering immensely large trees and you now notice a significant slow-down, you can change the renderMode like: ```ts <ul daff-tree ... renderMode="not-in-dom"> ... </ul> ``` Which will restore the original behavior.
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.
That's by intent. The idea is that for a tree like: We currently render: <li level="1">@daffodil/analytics</li>
<li level="1">analytics-provider-data-layer</li>
<li level="1">@daffodil/auth</li>
<li level="1">@daffodil/authorize.net</li> We now render: <li level="1">@daffodil/analytics</li>
<li level="2" class="hidden">Overview</li>
<li level="2" class="hidden">Configuration</li>
<li level="1">analytics-provider-data-layer</li>
<li level="1">@daffodil/auth</li>
<li level="1">@daffodil/authorize.net</li> The hidden elements remain rendered in the DOM, they just aren't visible. The "level-1"'s are essentially always visible because they're the "top" level that needs to be interactable to open the tree. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Previously, "hidden" child nodes were entirely removed from the document.
Fixes: N/A
What is the new behavior?
This introduces a new Input on DaffTreeComponent called "renderMode" that accepts "not-in-dom" or "in-dom", with "in-dom" being the default.
Does this PR introduce a breaking change?
BREAKING CHANGE: Previously, the now-named renderMode "not-in-dom" was the default. This is no longer the case. If one was rendering immensely large trees and you now notice a significant slow-down, you can change the renderMode like:
Which will restore the original behavior.
Other information