forked from MapComplete/MapComplete
UX: fix #1729: ignore accents in theme search
This commit is contained in:
parent
8e73369308
commit
4eb8b086e2
2 changed files with 93 additions and 85 deletions
|
@ -118,7 +118,7 @@ export default class MoreScreen extends Combine {
|
|||
if (search === undefined) {
|
||||
return true
|
||||
}
|
||||
search = search.toLocaleLowerCase()
|
||||
search = Utils.RemoveDiacritics(search.toLocaleLowerCase())
|
||||
if (search.length > 3 && layout.id.toLowerCase().indexOf(search) >= 0) {
|
||||
return true
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ export default class MoreScreen extends Combine {
|
|||
continue
|
||||
}
|
||||
const term = entity["*"] ?? entity[Locale.language.data]
|
||||
if (term?.toLowerCase()?.indexOf(search) >= 0) {
|
||||
if (Utils.RemoveDiacritics(term?.toLowerCase())?.indexOf(search) >= 0) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue