Does the render function affect the search

Does the render function affect the search

amiladinovamiladinov Posts: 1Questions: 1Answers: 0

I have a datatable and 2 select fields which are parent and a child resource in a database.
Some children have the same names, but different parents.
I want to search for match on both of these columns. Right now I am searching whether the one matches or the other.
Here is my search code https://pastebin.com/J8nZKst3
Because I had some texts matching I tried {id-name} format and it works fine https://prnt.sc/sdll6v
But I cant' display {id-name} to the user, it needs to be only as a background information, so the search can work properly.
So i tried the render function:
{ targets: 4, render: function(data, type, full, meta) { let index = data.indexOf('-') return data.slice(index+1); }, },

I even console logged to see what happens, it still looks like the values are the same, but when I render it differently it shows no results.

Does the render function actually affect the search ?
I am a 100% sure that I have some other cases in which this solution works fine, so why is there a problem now, I don't get it.

This discussion has been closed.