HierarchicalDataProvider interface

Hello everyone,

I saw that there are plans to support collapsed/expanded states for the TreeGrid, but are there plans to make it part of the HierarchicalDataProvider ? Something like

public boolean isExpanded(T item); It seems to me that when the model is loaded, the state should be decided then. Not all usages of a TreeGrid imply lazyloading and selecting the expand button manually.


TreeGrid and Tree now have the method isExpanded(T), as well as expand(T) and expand(Collection). These methods do not belong to the data provider because different components displaying the same data might want to expand items differently.

During the development, there was discussion about a callback API for deciding the initial expansion state, but it would only serve a subset of identified use cases (many of which are also served by other approaches), so an approach with explicit expand(T) was chosen. Implementing such a feature would most likely require some changes to HierarchicalDataCommunicator and/or HierarchyMapper.