Skip to content

Conversation

@noraleonte
Copy link
Contributor

@noraleonte noraleonte added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: tree view Changes related to the tree view. This includes TreeView, TreeItem. labels Nov 28, 2025
@mui-bot
Copy link

mui-bot commented Nov 28, 2025

Deploy preview: https://deploy-preview-20483--material-ui-x.netlify.app/

Updated pages:

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 1abfbe0

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the updateItemChildren API method in the Tree View component to accept null as a parameter, enabling developers to refresh the entire tree's root children. This is a useful feature for scenarios where the complete tree data needs to be reloaded rather than just a specific item's children.

Key Changes:

  • Updated the updateItemChildren type signature to accept TreeViewItemId | null instead of just TreeViewItemId
  • Added comprehensive test coverage for both null and non-null parameter cases
  • Updated API documentation to clarify the null parameter behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/x-tree-view/src/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.ts Updated type signature and JSDoc for updateItemChildren to accept null parameter
packages/x-tree-view-pro/src/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.test.tsx Added two test cases covering null and itemId parameters for updateItemChildren method
docs/data/tree-view/rich-tree-view/lazy-loading/lazy-loading.md Added inline comment explaining null parameter usage in API documentation

…ing/useTreeViewLazyLoading.types.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nora <72460825+noraleonte@users.noreply.github.com>
@flaviendelangle flaviendelangle changed the title [tree view] make updateItemChildren accept null [tree view] Update the typing of updateItemChildren() to accept null Dec 4, 2025
@noraleonte noraleonte merged commit 88d4f34 into mui:master Dec 4, 2025
21 checks passed
@noraleonte noraleonte deleted the make-updateItemChhildren-accept-null branch December 4, 2025 12:11
A-s-h-o-k pushed a commit to A-s-h-o-k/mui-x that referenced this pull request Dec 14, 2025
mui#20483)

Signed-off-by: Nora <72460825+noraleonte@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
mapache-salvaje pushed a commit to mapache-salvaje/mui-x that referenced this pull request Dec 29, 2025
mui#20483)

Signed-off-by: Nora <72460825+noraleonte@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tree view Changes related to the tree view. This includes TreeView, TreeItem. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants