Fabrik/fabrik — pull request #1097 by paulv888 (2013-11-28 05:29:00+00:00)
Title: FIX Ajax filter stuck

Problem: Ajax filter is stuck on ajax spinner after changing filter 2-3 filter changes. Takes 3 on initial load and 2 after refresh.

Reproduce: Setup a simple list, 1 field. And have a dropdown filter on this. Filter list onChange. Have NO submit button (fabrik_filter_submit button) on the page. Load the page, flip the filter 3 times and should be stuck.

Solution: Problem seems to be in the rebinding filter events. I.e. it looks like the removeEvent is somehow not working. On the second filter change 2 events seem to be fired at the same time (breaking at doFilter twice, but only 1 post or _rowUpdate). By taking the watchFilter out of the Ajax refresh this work a lot better. I current value does need to be stored.