How can I set a custom filter in my code to ignore accents and special character from the table before filtering?
I am using DataTables plugin (http://www.datatables.net/)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Include a version of the data that is missing the accents as a column in the datatable. You hide that column by adding an entry in the
aoColumnsarray in the configuration literal.Let’s say you start with 4 columns. One of these has accents. Add a fifth column with non-accented data, and add a configuration literal with
{ "bVisible": false }so that it will not be displayed.It’s invisible, but it’s still searchable / filterable:
See the column documentation for more on configuration. DataTables with hidden columns is an example in use.