fix: search with 'ё' like 'е'
This commit is contained in:
parent
b341d66f08
commit
9d9302525b
@ -78,8 +78,8 @@ export class ProfessorComponent implements OnInit, IScheduleTab {
|
||||
if (value === '')
|
||||
return [];
|
||||
|
||||
const filterValue = value.toLowerCase();
|
||||
return this.professors?.filter(teacher => teacher.name.toLowerCase().includes(filterValue)) ?? [];
|
||||
const filterValue = value.toLowerCase().replace('ё', 'е');
|
||||
return this.professors?.filter(teacher => teacher.name.toLowerCase().replace('ё', 'е').includes(filterValue)) ?? [];
|
||||
} else {
|
||||
const selectedTeacher = this.professors?.find(teacher => teacher.id === value);
|
||||
return selectedTeacher ? [selectedTeacher] : [];
|
||||
|
Loading…
Reference in New Issue
Block a user