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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user