extjs clearfilters() does nto execute immediately?
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 开发者_如何学Gostate 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 :
for (variable=startvalue;variable<=endvalue;variable=variable+increment)
{
code to be executed
}
精彩评论