Skip to content

Commit

Permalink
feat: Use RegExp for Interpreter Search
Browse files Browse the repository at this point in the history
  • Loading branch information
seung-00 committed Nov 9, 2024
1 parent 892f526 commit 0727f10
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ export class InterpreterComponent implements OnInit, OnDestroy {
}

filterInterpreters(value: string) {
const lowerCaseValue = value.toLowerCase();
this.filteredInterpreterSettings = this.interpreterSettings.filter(e =>
e.name.toLowerCase().includes(lowerCaseValue)
this.filteredInterpreterSettings = this.interpreterSettings.filter(
e => e.name.search(new RegExp(value, 'i')) !== -1
);

this.cdr.markForCheck();
Expand Down

0 comments on commit 0727f10

Please sign in to comment.