I’m looking for a way to filter a table while avoiding accent problems.
let options = ['Hello', 'Hého', 'Heïho'];
filterOptions(filterValue) {
this.filteredOptions = this.options.filter(
option => option.includes( filterValue )
)
},
With the above function, when I search in options by writing the word "Heho", it doesn't return any results because I didn't put an accent.
I tried using this, but it doesn't work at all
filterOptions(filterValue) {
this. filteredOptions = this. options.filter(
option => option.includes( filterValue.localeCompare(option, undefined, { sensitivity: 'base' }) === 0 )
)
},
Do you know how I can filter my table avoiding accents?