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 === '')
|
if (value === '')
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
const filterValue = value.toLowerCase();
|
const filterValue = value.toLowerCase().replace('ё', 'е');
|
||||||
return this.professors?.filter(teacher => teacher.name.toLowerCase().includes(filterValue)) ?? [];
|
return this.professors?.filter(teacher => teacher.name.toLowerCase().replace('ё', 'е').includes(filterValue)) ?? [];
|
||||||
} else {
|
} else {
|
||||||
const selectedTeacher = this.professors?.find(teacher => teacher.id === value);
|
const selectedTeacher = this.professors?.find(teacher => teacher.id === value);
|
||||||
return selectedTeacher ? [selectedTeacher] : [];
|
return selectedTeacher ? [selectedTeacher] : [];
|
||||||
|
Loading…
Reference in New Issue
Block a user