Before this directive we do it this way:
public ngAfterViewInit() {
const contains = (value: string) => (object: IBaseObjectConfigurationField) => object.name.toLowerCase().indexOf(value.toLowerCase()) !== -1;
this.multiSelect.filterChange
.asObservable()
.pipe(
switchMap(value =>
from([this.collection])
.pipe(
tap(() => {
this.multiSelect.loading = true;
}),
delay(value ? 350: 0),
map(data => data.filter(contains(value))),
),
),
)
.subscribe(x => {
this.filteredCollection = x;
this.multiSelect.loading = false;
});
}
Please provide a (global) option for red line!