Please fix TreeViewItem::createItemComponent() lifetime.
From the docs:
Also bear in mind that if the component keeps a reference to the item that created it, that item could be deleted before the component.
My use case:
- Create a bunch of objects
- Add TreeViewItems to the Tree represent these objects
- Sometime later, delete all the TreeViewItems and objects
- I now expect the TreeView to be empty
- TreeViewItem component crashes, because it points to a object that no longer exists
This limits the TreeViewItem Component to be fairly dumb and contain all the data it needs to operate. It can’t point back to some source object.
When you delete a TreeViewItem, it should immediately delete any components it created.
Alternative but now as good, please add a way to delete these dangling Components.