The search functionality searches across divs in a td, is there anything I can do about that?
The search functionality searches across divs in a td, is there anything I can do about that?
fobrien
Posts: 2Questions: 1Answers: 0
Hi guys,
If I have a table that contains divs for styling purposes, I am finding that the Seach function returns rows that contain the end of one div, and the start of another. For example:
<table>
<tr>
<td>
<div>Foo</div>
<div>Bar</div>
</td>
</tr>
</table>
Putting "ooba" into the DataTables search bar will return that row. Is there any way to make the search treat those as separate entities, and therefore not come back in this example?
Thanks guys
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Is there white space between the div's in your actual HTML? If so, that should really be all that is needed. DataTables is just striping out the tags. If there were no white space, then yes, I could see
ooba
matching that cell.Allan
Boom! Allan to the rescue. Thanks very much.