How to display filtered data after filter(FUNCTION) has been applied
How to display filtered data after filter(FUNCTION) has been applied
![vcicmanec](https://secure.gravatar.com/avatar/79dbbb4e7f9c66b333903554c378fb5c/?default=https%3A%2F%2Fvanillicon.com%2F79dbbb4e7f9c66b333903554c378fb5c_200.png&rating=g&size=120)
Is there a way to display the data, for which the result of function in the filter()
call returns true
?
What I mean is, I call
table.columns( [0, 1] ).data().filter(my_custom_function)
If I add .draw()
after this, the table is not affected.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The
filter()
function filters the result set, not the table. Thesearch()
method is used for the search option.As the documentation for
filter()
says:Not the answer you want I know - but that is why it isn't doing as you expect.
Having the ability to give a function to
search()
is a feature I'm planning to add in future.Allan