Description
It should be possible to customize the implementation of ObservableList used in TreeItem. A common use case is to use a SortedList or a FilteredList. When using a FilteredList the TreeView does not update correctly when all children of a TreeItem are filtered. In this case the expand/collapse button should be hidden, but this is not the case.
The reason behind this is that TreeItem attaches its childrenListener only to the original ObservableList that is created lazily in getChildren(). This listener is responsible for setting the read only leaf property.
The reason behind this is that TreeItem attaches its childrenListener only to the original ObservableList that is created lazily in getChildren(). This listener is responsible for setting the read only leaf property.