HI,
We are using filter result by ajax in site, but when we frequently change the category in filter, that selected category is removed and showing all result without filter.
You can check this on hidden link
Please help me to solve this that filter work correctly.
I've been visiting your search page and trying to break it, but haven't been able to so far.
The only issue that I can see, that is largely unavoidable, is that if you click several categories very quickly one after another—e.g. click education, entertainment, and finance very quickly—then some of the checked categories can become unchecked.
That's because your settings are to update the results as soon as any filter value is changed, so clicking a category creates an ajax request to update the results, which also replaces the filter control section, too, and so if you click a second category before the results of the first click are returned your second click might be lost.
I'm not sure if that is the problem you are describing, or whether you mean something else.
If that were the case you would need to resolve it by changing the settings so that results update via ajax, but only after clicking the submit button.
Thank You Nigel,
As you said:
"That's because your settings are to update the results as soon as any filter value is changed, so clicking a category creates an ajax request to update the results, which also replaces the filter control section, too, and so if you click a second category before the results of the first click are returned your second click might be lost."
Exactly this is happening. Is there any way to prevent this?
You might see an improvement if you change the settings for the View.
The screenshot shows what I think you currently have. If you change it to "Always show all values for inputs" that might help.
But if you see the same, then the only alternative is to change the settings so that they update only with a submit button (even though the results themselves can update via ajax).