diff --git a/static/src/app/statistic/highscore/highscore.component.ts b/static/src/app/statistic/highscore/highscore.component.ts index 880c9f2..2f6a1a1 100644 --- a/static/src/app/statistic/highscore/highscore.component.ts +++ b/static/src/app/statistic/highscore/highscore.component.ts @@ -96,8 +96,16 @@ export class StatisticHighScoreComponent { } private filterPlayerAttribute(attribute) { - const query = this.searchTerm.value.toLowerCase(); - return this.playersStored[attribute].filter(p => p.name.toLowerCase().includes(query)) + const query = this.searchTerm.value.toLowerCase().split('&'); + + return this.playersStored[attribute].filter(player => { + for (let i = 0; i < query.length; i++) { + if (player.name.toLowerCase().includes(query[i].trim())) { + return true; + } + } + return false; + }) } }