Fixed I have noticed a bug with filter_list.js when it comes to filtering ajax with groups

Uniphix

Active member
In filterAjax function find

Code:
var $items = $children.filter('.listItem'), items = [];
                $items.each(function(i, el) {
                    items[i] = new XenForo.FilterListItem($(el));
                });

and replace with

Code:
var $items = $children.filter('.listItem').add($children.find('.listItem')), items = [];
                $items.each(function(i, el) {
                    items[i] = new XenForo.FilterListItem($(el));
                });

as it should be find and filter, not just filter. Reason why is that filter is only searching the top elements in this case if I have 3 groups, therefore they are not .listItem therefore items will return when in fact I have maybe 5 listItem inside of the groups. Thus, it should be filtering the top and adding the children by using find as well. When I tested it it worked in both situations much better.

Upx
 
This seems reasonable, though I would note that I don't think the ajax-based filtering really has grouping in mind so there may be a few other oddities.
 
Top Bottom