DataTables / DataTables/Plugins
diacritics-neutralise plugin enabled only for string columns. What about html ones?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
First of all, I am discovering the benefits of dataTables and you guys did an amazing job.
I recently needed the search to ignore diacritics, so I found the diacritics-neutralize plugin. At first sight, it didn't work.
After diving into the code, I realised it's only enabled for string columns. But the column I wanted to filter were html ones.
So I fixed this by adding the snippet below, at the end of the diacritics-neutralise.js file:
jQuery.fn.DataTable.ext.type.search.html = function (s) {
return removeDiacritics(s)
};
It seems to be working fine with HTML columns now. Maybe you can provide an option to search there are well? Not really familiar with the plugin framework to be able to post a PR, hence opened an issue for your consideration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in diacritics-neutralise.js and inspect how the plugin enables neutralized searching for string columns versus HTML columns. Verify the requested HTML-column behavior against the provided DataTables search hook, then confirm that searches containing diacritics work for HTML content without breaking existing string-column behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100