I use TreeTable with custom datasource. I want to filter it and expand items that match particular conditions. But the only method, that I found, is setCollapsed(itemId, collapsed)
But using this method for great amount of items will break the performance. Any suggestions how can I solve this problem?
I use TreeTable with custom datasource. I want to filter it and expand items
Share
You can add an SimpleStringFilter (or your own implementation of Filter) to the container of the treeTable (Vaadin API for more info).
Adding an filter to a container will retains only the matching item in the container data source (the
Container.getItemsIds().size()will return the exact number of matching items).After that you can use the
setCollapsed()method with fewer items.Regards.