Ts merged with & & led to a mistake, it seems.

  public search (searchApartmentList: string[], searchRentList: string[], searchResourceList: string[]): void {
    this.searchApartmentList = searchApartmentList;
    this.searchRentList = searchRentList;
    this.searchResourceList = searchResourceList;
    console.log(this.searchApartmentList, this.searchRentList, this.searchResourceList);
    const filterFunc = (item: any) => (this.searchApartmentList.length ? this.searchApartmentList.some((apartment_code: string) => item.apartment_code.indexOf(apartment_code) !== -1) : true) && (this.searchRentList.length ? this.searchRentList.some((rent_status: string) => item.rent_status.indexOf(rent_status) !== -1) : true) && (this.searchResourceList.length ? this.searchResourceList.some((resource_code: string) => item.resource_code.indexOf(resource_code) !== -1) : true);
    const data = this.dataSet.filter((item: any) => filterFunc(item));
    console.log(data);
    if (this.sortName) {
      this.displayData = data.sort((a: any, b: any) => (this.sortValue === "ascend") ? (a[this.sortName] > b[this.sortName] ? 1 : -1) : (b[this.sortName] > a[this.sortName] ? 1 : -1));
      console.log(this.displayData);
    } else {
      this.displayData = data;
    }
  }
When

is called, the searchReasourceList of the empty array becomes undefined

.

clipboard.png

becomes two items & & that"s fine. Why

Mar.21,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e542a2-59817.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e542a2-59817.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?