Skip to content

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Aug 20, 2025

Closes #18200

If we expose publicAPI.fetchItems, then we need to add a param to it to allow to skip the cache (otherwise the data is just read from the cache). The DX would not be great because people would always use this param.

We could expose a publicAPI.updateItems then we have a good DX, but we need to update the behavior of the queue and I'm afraid to run into edge cases (if we have some requests in the queue that want to ignore the cache but not others). I'm not sure it's worth the complexity and potential bugs, which is why I sticked by the simpler publicAPI.updateItem which seems like a good starting point.

@flaviendelangle flaviendelangle marked this pull request as draft August 20, 2025 07:24
@flaviendelangle flaviendelangle self-assigned this Aug 20, 2025
@mui-bot
Copy link

mui-bot commented Aug 20, 2025

Deploy preview: https://deploy-preview-19248--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-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 🔺+38B(+0.07%) 🔺+12B(+0.06%)
@mui/x-tree-view-pro 🔺+199B(+0.25%) 🔺+60B(+0.23%)

Details of bundle changes

Generated by 🚫 dangerJS against a81e04b

@flaviendelangle flaviendelangle added type: new feature Expand the scope of the product to solve a new problem. scope: tree view Changes related to the tree view. This includes TreeView, TreeItem. labels Aug 20, 2025
@flaviendelangle flaviendelangle marked this pull request as ready for review August 21, 2025 07:45
@flaviendelangle flaviendelangle added type: bug It doesn't behave as expected. and removed type: bug It doesn't behave as expected. labels Aug 21, 2025
Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Nice work, LGTM 🎉

Leaving just a few small comments that are related to the docs 😄

<Button onClick={checkExpansion}>
Check if the the Data Grid is expanded
</Button>
<Snackbar
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of this demo, but maybe we could try containing the snackbar inside the demo container 🤔
image
Also, if the snackbar is open and we click the button again, the snackbar closes. To me the toggle behavior is weird, so maybe we could disable the button while the snackbar is open, WDYT? 🎉

Copy link
Member Author

Choose a reason for hiding this comment

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

Clicking anywhere closes the snackbar, it's not specific to the button 👍

@flaviendelangle flaviendelangle force-pushed the refetch-children branch 2 times, most recently from 22a3fd5 to fd5683f Compare September 1, 2025 06:18
@mui-bot
Copy link

mui-bot commented Sep 2, 2025

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-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 🔺+38B(+0.07%) 🔺+12B(+0.06%)
@mui/x-tree-view-pro 🔺+199B(+0.25%) 🔺+60B(+0.23%)

Details of bundle changes

@flaviendelangle flaviendelangle merged commit e2f357c into mui:master Sep 2, 2025
21 checks passed
@flaviendelangle flaviendelangle deleted the refetch-children branch September 2, 2025 12:28
JCQuintas pushed a commit to JCQuintas/mui-x that referenced this pull request Sep 15, 2025
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: new feature Expand the scope of the product to solve a new problem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tree view] Trigger manual refresh of lazy loaded children & check parent expansion
3 participants