Hey guys I found this one on multiple checkboxes filter: angular js multiple checkbox with custom filters
I have a similar problem but a multilevel JSON. Something like this: http://ift.tt/1CSbBY6
Especialy this part is my problem:
$scope.searchFilter = function(row){
var mercChecked = getChecked($scope.merchantCheckboxes);
var brandChecked = getChecked($scope.brandCheckboxes);
if(mercChecked.length == 0 && brandChecked.length == 0)
return true;
else{
if($scope.merchantCheckboxes[row.MerchantName])
return true;
else{
return row.BrandList.split(/,\s*/).some(function(brand){
return $scope.brandCheckboxes[brand];
});
}
}
};
Any ideas?
Aucun commentaire:
Enregistrer un commentaire