trim text in search input
trim text in search input
m75sa
Posts: 132Questions: 30Answers: 0
Hi,
i saw this post:
https://datatables.net/forums/discussion/47868/trim-searchtext-in-jquery-datatables-using-default-searchbox
but i don't know if this works in my case... anyway i cannot find a solution.
What i need is to trim the search input in order to have results also when i have space.
Any help on this?
Replies
Why does that solution not work? The solution takes over the keyup event handler and use trim() to trim the search input. Here is a quick demo with the code in the thread you linked:
http://live.datatables.net/misigice/1/edit
You can see in the console output that the search input is trimmed.
Please provide a link to a test case showing what you are trying to do so we can offer suggestions.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin