this.manufacturer.valueChanges
.pipe(
filter((value: string) => (value ? value.length > 0 : false)),
tap(() => (this.loadingAutocomplete = true)),
debounceTime(500),
switchMap(val =>
this.frameService.getItems(val, "manufacturerAutocomplete").pipe(
catchError(err => {
handleError(err);
this.loadingAutocomplete = false;
return [];
})
)
),
tap(() => (this.loadingAutocomplete = false))
)
.subscribe(
manufacturers => {
this.matchingManufacturers.next(manufacturers);
},
err => {
this.loadingAutocomplete = false;
this.matchingManufacturers.next([]);
}
);
我正在尝试将帧(char [6])的源mac地址与数组的元素(每个元素是char [6] mac地址)进行比较,如果它在其中,则设置为是的。