Can we search DataTable on full word instead of each letter typed
Can we search DataTable on full word instead of each letter typed
hritesh
Posts: 1Questions: 1Answers: 0
Hi,
I am trying to search a term on full word rather than on each letter typed..
Thanks
This discussion has been closed.
Answers
The built in
input
will always search on each key press. It uses sub-string matching for things like "some" / "something" / "someone".If you want to do full word matching you could use a regular expression with
search()
- e.g.table.search('^allan$', true, false).draw();
.Allan
Hi @hritesh ,
The standard search doesn't support that - you can delay the sending with
searchDelay
but that's as far as it goes. That said, you could remove the standard search in thedom
and create a custom search element instead that does do what you want (this demonstrates a custom search),Cheers,
Colin