mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 01:58:40 -05:00
Changing the autocomplete search to accept text without accents to match options with accents (#2842)
* Changing the autocomplete search to accept text without accents to match options with accents * lint fix * Added upcoming-release-notes
This commit is contained in:
@@ -92,7 +92,16 @@ export function defaultFilterSuggestion<T extends Item>(
|
||||
suggestion: T,
|
||||
value: string,
|
||||
) {
|
||||
return getItemName(suggestion).toLowerCase().includes(value.toLowerCase());
|
||||
return getItemName(suggestion)
|
||||
.toLowerCase()
|
||||
.normalize('NFD')
|
||||
.replace(/\p{Diacritic}/gu, '')
|
||||
.includes(
|
||||
value
|
||||
.toLowerCase()
|
||||
.normalize('NFD')
|
||||
.replace(/\p{Diacritic}/gu, ''),
|
||||
);
|
||||
}
|
||||
|
||||
function defaultFilterSuggestions<T extends Item>(
|
||||
|
||||
6
upcoming-release-notes/2842.md
Normal file
6
upcoming-release-notes/2842.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Enhancements
|
||||
authors: [lelemm]
|
||||
---
|
||||
|
||||
Enhanced autocomplete for languages with accents like Portuguese. Matches search queries regardless of accents.
|
||||
Reference in New Issue
Block a user