[TreeView] RichTreeView
throws error when using dynamic items
#12510
Labels
bug 🐛
Something doesn't work
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
Steps to reproduce
Link to live example: (required)
https://codesandbox.io/p/sandbox/cool-leftpad-g472qt?file=%2Fsrc%2FDemo.tsx%3A44%2C5
Steps:
Current behavior
When updating items prop to achieve filtering of the original items and then updating the items prop to revert to the original items then an error is thrown.
Error comes from this line of code.
Expected behavior
Any kind of updating to the items prop should not throw an error.
Context
Filtering of tree items powered by a search text box.
Your environment
npx @mui/envinfo
Error occurs on any browser.
Search keywords: richtreeview dynamic items
The text was updated successfully, but these errors were encountered: