i made two dropdowns with color and width (parameters for filtering) and table that bind data according to choosed parameters, but dropdowns not working together, they interrupt each other: like once it filter by color, then by width, but not by color and width I write it on angular2 here is the code of my pipe: (i dont know how to make it in write way)
export class FilterDropDownPipe implements PipeTransform {
transform(items: any[], args: any[]): any {
return items.filter(
(item) => {
console.log(item)
console.log(args)
// return item.platform === args && item.type === args;
for (let p in item) {
if (item[p] === args) {
return item[p] === args;
}
}
});
}
}