Question

I have a TreeStore which fills with data from Json. I'm applying filter on it.

if ( !filter.filterFn(node) ) { node.remove(); }

For the first search attempt everything works great but at the second attempt not all data is used in the search. In order to use all data I need to do .load() for the storage. But in this case the request to the server will be send and filter will be applied applied. Is there any way to achieve this behavior?

Was it helpful?

Solution

I'm not certain I totally follow your question, but I think you want to remove the earlier filter before you apply a new filter.

You can add a line right before the call to add the filter.

Something like this:

yourTreeStore.filters.clear();

(where yourTreeStore is a reference to your Ext.data.TreeStore you are adding the filters to)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top