Uniphix
Active member
In filterAjax function find
and replace with
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
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