I have a treeView with checkable nodes and a couple of buttons with which I can "check all" and "check none".
These buttons run through dataSource.data() and and call set('checked', true) or set('checked', false) on each node.
This all works well until I start filtering the dataSource by its 'checked' state:
dataSource.filter({ field: 'checked', operator: 'eq', value: true });
When the filter is on (means I want to only see the checked items), and I click on "check none", I would like all the items in the treeview to dissapear (which is what the datasource tells me when I look at dataSource.view(): it contains 0 items). When I click on "check all", I would like all the items in the treeview to appear. Also, when I uncheck an individual item, I would like it to dissapear immediately.
I can accomplish that with re-setting the filter, but the problem is that this takes ages. With a treeview of 1300 items (and this is without any children loaded), resetting the filter takes almost 10 seconds!
Is there a better - or rather usable - way to refresh the treeview's filter after a node has been checked/unchecked?