Convert diacritics to approximations before filtering

- Introduces a helper method for setting the filterable value
- Updates `filter_controller.js` to use `data-filter-text-value` attribute populated with converted content. This was previous `data-value` in the earlier implementation but ignored in the current on.
- Also uses the same helper to make @mentions diacritic insensitive
This commit is contained in:
Jason Zimdars
2025-06-30 13:53:50 -05:00
parent dc351959e8
commit 2678f8c099
20 changed files with 35 additions and 30 deletions
@@ -10,7 +10,7 @@ export default class extends Controller {
filter() {
this.itemTargets.forEach(item => {
if (item.innerText.toLowerCase().includes(this.inputTarget.value.toLowerCase())) {
if (item.dataset.filterTextValue.toLowerCase().includes(this.inputTarget.value.toLowerCase())) {
item.removeAttribute("hidden")
} else {
item.toggleAttribute("hidden", true)