Hi I'm using datatables and I would like to filter my data by an exact word.
My table data looks like below;
+-----+----------+
| num | status |
+-----+----------+
| 1 | Active |
+-----+----------+
| 2 | Inactive |
+-----+----------+
| 3 | Active |
+-----+----------+
Whenever I search for Active
I also see all the Inactive
too. Is there any way to filter this so that either the status column only shows exact words.
My JS is below;
$(document).ready(function() {
var table = $('#items').DataTable( {
select: true,
responsive: true
} );
} );
I've been reading through the API however I can't make much sense of it. Perhaps I need to write some regex?
There's an example (I think) here, however I need to modify it to my needs.
Any help or advice would be appreciated.