📜  过滤单列物料表 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:05.178000             🧑  作者: Mango

代码示例1
private createFilter(): (contact: Contact, filter: string) => boolean {
    let filterFunction = function (contact, filter): boolean {
      let searchTerms = JSON.parse(filter);

      return contact.status.indexOf(searchTerms.status) !== -1
        && contact.source.indexOf(searchTerms.source) !== -1;
    }

    return filterFunction;
  }