Column search No matching records found
Column search No matching records found

Hello guys,
im building a table that allows users to filter columns. My problem is that i have more than 1 field per column
example:
<td>
<span style="text-align: center; display: block;">
<div><i class="fas fa-phone"></i> 999999999 </div>
<div><i class="far fa-envelope"></i> email@email.com </div>
</span>
</td>
How can i use this to allow filters? i already tried to add a class example:
<td>
<span style="text-align: center; display: block;" class="search">
<i class="far fa-envelope"></i> email@email.co
</span>
<div><i class="fas fa-phone"></i> 999999999 </div>
</td>
and in my code:
column.data().unique().sort().each( function ( d, j ) {
const search = $.parseHTML( d );
for(let i = 0; i<=search.length; i++) {
if(search[i] != undefined) {
try {
if(search[i].classList.contains('search')){
select.append( '<option value="'+search[i].innerHTML+'">'+search[i].innerHTML+'</option>' )
}
} catch(e) {
}
}
}
but this doenst work too, any help?
Answers
Its hard to visualize what the code is doing. Maybe you can put together a simple test case to show us. This way we can work with the code to understand it and offer suggestions.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin