I’m using datatable serverside data filtering with a c++ cgi and everything works fine.
The default filter behaviour (send request each character typed in) is overheading because the huge database on server, so I want use the enter key to start the filtering; I have implemented the following code:
...
var k = false;
...
onKeyPress: function (code, e)
{
k = (code == 13 && e.target.nodeName === "INPUT") ? true : false;
},
onBeforeFilter: function (columnId, value, config)<br>
{
return k;
},
...
is there something more elegant?
Is it possible to put the search icon in the filter input element and listening for the click event?