Update 24/12/2017
You can control what is searched (and even what is ordered) through the option Columns.render.
In this case, a function should be passed and treated when second parameter type
have the content filter
. The fourth parameter meta
can help determine which is the line without depending on any additional data in the table, because meta.row
is the index of the line.
It would look something like this:
render: function (data, type, row, meta) {
if (type == "filter" && meta.row == 0)
return "Texto customizado"; //aqui fica a seu critério o valor que será pesquisado
return data;
}
Original response
You can control what is searched (and even what is ordered) through the option Columns.render.
In this case, a function should be passed and treated when second parameter type
have the content filter
. It would look something like this:
render: function (data, type) {
if (type == "display")
return data;
else if (type == "filter")
return "Texto customizado";
}
There must be something wrong with your code, because the search only looks for text and ignores tags and what’s inside them.
– Sam
Because it’s more I don’t know where it is. when I search by head.png it searches everyone who has the image.
– Everton Figueiredo
Then you’d have to show your code so we can try to reproduce the problem.
– Sam
html or . js code?
– Everton Figueiredo
Create a jsfiddle from post there html and js
– Sam