Reputation: 12859
I want to filter the items in a Vaadin 8 TreeGrid
based on a (user provided) search phrase and a back-end based (lazy loading) HierarchicalDataProvider
.
I cannot find any references / examples how to realize the filtering part of this solution. I am looking for the correct way of doing this.
Upvotes: 1
Views: 1759
Reputation: 2749
Basically your HierarchicalDataProvider
must support this. See the docs.
For the built-in InMemoryHierarchicalDataProvider
a setFilter
method is provided. For your own hierarchical data provider you could take the filter part of the HierarchicalQuery
into account when implementing fetchChildren
and the corresponding count method.
Upvotes: 2