javascript - Filter table by all match dropdown without interrupt each other -
i made 2 dropdowns color , width (parameters filtering) , table bind data according choosed parameters, dropdowns not working together, interrupt each other: once filter color, width, not color , width write on angular2 here code of pipe: (i dont know how make in write way)
export class filterdropdownpipe implements pipetransform { transform(items: any[], args: any[]): { return items.filter( (item) => { console.log(item) console.log(args) // return item.platform === args && item.type === args; (let p in item) { if (item[p] === args) { return item[p] === args; } } }); } }
Comments
Post a Comment