You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for this great example of client side filtering. There are so many useful ways to use this concept. In one of the examples (bytepartners), i saw a different use of adding filters.
Instead of .Addcriteria, i see .addFilter, and it seems to be behaving different. Within the same filtering group, the filter elements are considered as they have AND between them, instead of OR. In other words, the checkboxes are behaving like radio buttons.
I am wondering if it's this section where I need to make modifications to correct the issue:
var include = true;
while (f-- && include) {
var filter = filters[f];
if (typeof urlFilters[filter.key] == 'undefined') {
urlFilters[filter.key] = filter.value;
} else if (urlFilters[filter.key].indexOf(filter.value) === -1) {
urlFilters[filter.key] += ',' + filter.value;
}
if(item[filter.key].constructor === Array) {
if (item[filter.key].includes(filter.value)) {
continue;
} else {
include = false;
}
}
Any assistance is much appreciated.
The text was updated successfully, but these errors were encountered:
First of all thank you for this great example of client side filtering. There are so many useful ways to use this concept. In one of the examples (bytepartners), i saw a different use of adding filters.
Instead of .Addcriteria, i see .addFilter, and it seems to be behaving different. Within the same filtering group, the filter elements are considered as they have AND between them, instead of OR. In other words, the checkboxes are behaving like radio buttons.
I am wondering if it's this section where I need to make modifications to correct the issue:
var include = true;
while (f-- && include) {
var filter = filters[f];
if (typeof urlFilters[filter.key] == 'undefined') {
urlFilters[filter.key] = filter.value;
} else if (urlFilters[filter.key].indexOf(filter.value) === -1) {
urlFilters[filter.key] += ',' + filter.value;
}
Any assistance is much appreciated.
The text was updated successfully, but these errors were encountered: