-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[tree view] Enable lazy load when children count is not know in tree view #18680
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] Enable lazy load when children count is not know in tree view #18680
Conversation
|
Deploy preview: https://deploy-preview-18680--material-ui-x.netlify.app/ Bundle size report
|
|
Thanks @noobyogi0010 for the contribution. 🎉 I think the change makes sense and it was the intended behavior, as described in the documentation:
I'd like to clarify a few behavioral things before merging and would like @flaviendelangle to weigh in:
|
|
This pull request has been inactive for 30 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 15 days. |
packages/x-tree-view/src/internals/plugins/useTreeViewItems/useTreeViewItems.tsx
Outdated
Show resolved
Hide resolved
|
I don't know the feature enough to have a valid opinion. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
|
This pull request has been inactive for 30 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 15 days. |
…view (mui#18680) Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com> Co-authored-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Change the comparison to consider the absolute value of children count, so that lazy load works even when the number of child nodes are unknow. In which case
getChildrenCountreturns-1.Fixes issue #18663
Adding @noraleonte and @flaviendelangle for visibility and to opine more on the fix.