My pipe is designed to work exclusively for the "name" column and not for the author anymore.
transform(items: Book[], filter: Book): any {
if (!items || !filter) {
return items;
}
// Filter items array; keep items that match and return true, filtering out anything false
return items.filter((item) => item.Nazwa.indexOf(filter.Nazwa) || item.Autor.indexOf(filter.Autor) !== -1)
}
}
Input data:
filterargs = { Nazwa: "", Autor: "" }