У меня есть фильтр таблицы материалов, но как создать строгий фильтр, который показывает только первое совпадение ..... первую отфильтрованную строку ???
Стандартная функция с несколькими фильтрами:
if (typeof(filterValue) === 'undefined'){
filterValue = '';
}
this.dataSource.filterPredicate = function( source, filter: string): boolean {
return source.stopIndex.toString().toLowerCase().includes(filter);
};
filterValue = filterValue.toString();
filterValue = filterValue.trim(); // remove whitespace
filterValue = filterValue.toLowerCase();
this.dataSource.filter = filterValue;
}