[p-table][filter] Filter ignores german specialchars ü === u
I'm submitting a ... (check one with "x")
[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior Specialchars ignored
Expected behavior Filter shoud repect specialchars like ä, ö, ü, ß
Minimal reproduction of the problem with instructions
https://github-rphzp8.stackblitz.io
Filter for "ö" or "ü" -> should not be found
What is the motivation / use case for changing the behavior?
Please tell us about your environment: Windows
-
Angular version: 8.1.1
-
PrimeNG version: 8.0.2
-
Browser: [all ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
I guess this is intended. There is a function which removed these accents are transforms e.g. 'ö' to 'o' etc.
https://github.com/primefaces/primeng/blob/master/src/app/components/utils/objectutils.ts#L150
Hello @maximaexchen ,
I also encountered this problem today and as a workaround I did:
import { ObjectUtils } from 'primeng/utils'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent extends ObjectUtils {
constructor() {
super();
ObjectUtils.removeAccents = (str) => {
return str;
}
}
At the moment, I have not found problems related to this workaround, so I hope it helps. :)
Accents are removed by design, if there is more interest in the future, we may bring it back with an option like filterAccents="true".