mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.55k stars 1.33k forks source link

[tree view] Dragging out all child nodes leaves the parent with expanded/collapsed indicator #15527

Closed arminmeh closed 1 day ago

arminmeh commented 1 day ago

Steps to reproduce

Steps:

  1. Open Enable drag & drop re-ordering
  2. Drag one parent's children out of that parent

Current behavior

Expanded/Collapsed indicator stays with the former parent even when it becomes a regular item

Expected behavior

Expanded/Collapsed indicator should be removed once there are no children left

Context

No response

Your environment

No response

Search keywords: tree-view, drag-and-drop, ordering

flaviendelangle commented 1 day ago

Thanks for the bug report :pray: It seems to work fine after #14210 (doc preview) which will be released this week. But we are still mutating the state which is far from ideal... even if it doesn't cause direct problem now.

github-actions[bot] commented 1 day ago

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.