When one fires the Grid.filters.clearFilters() command, does it execute immediately?
My problem is:
I do :
Grid.filters.clearFilters();
Then later.elsewhere…
filters.buildQuery = function(filters){
for(var i=0, len=filters.length; i<len; i++) {..custom logic.}
}
It goes in a infinite loop. It appears the state of the filters obj here is not defined properly.
When I put an alert() just before for loop, the alert gives it enough time to clear filters and it works fine.
What can I do to ensure that the clearfilters is completed before filters.buildQuery starts to execute? Something of the java equivalent of
Thread t1 = new Thread();
t1.jon();//so all other thread wait.
Grid.filters (I assume u mean ux.Gridfilters plugin) works fine with ext grid.
I’d say first remove an extra parameter in the loop, and see what happens then:)
javascript loop syntax is :