How to add filter functions with ES6 ?
How to add filter functions with ES6 ?
Johndodev
Posts: 5Questions: 3Answers: 0
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.