How to add filter functions with ES6 ?
How to add filter functions with ES6 ?
![Johndodev](https://secure.gravatar.com/avatar/047236e9f33c8c4ac1a752f3aadc892e/?default=https%3A%2F%2Fvanillicon.com%2F047236e9f33c8c4ac1a752f3aadc892e_200.png&rating=g&size=120)
Hello,
According to https://datatables.net/examples/plug-ins/range_filtering.html we should add filtering functions like that : $.fn.dataTable.ext.search.push(...)
.
Problem is, when we initialize table with imports and new Datatable(...)
, $.fn.dataTable.ext.search
doesn't exist.
Is there a new more modern way to do this now ?
This question has an accepted answers - jump to answer
Answers
Use:
I've got a change for that example already committed, but I'm working on related changes before pushing it out.
The key to remember is that
$.fn.dataTable
is the same asDataTable
(assuming you doimport DataTabe from 'datatables.net'
or are just including the UMD file on your page).Allan
Ahhh I tried with the new instance but not the "module" himself. Thanks.