开发者

is there a way to change the jquery datatable filter behavior

with a moderm browser, the jquery datatable plugin works very well but in ie6 i find that its almost impossible to type in teh filter textbox as the keypress filtering is insanely slow so the browser can't keep up with your typing.

is there anyway t开发者_如何学编程o change the behavior so that it only searches and filter on enter key compared to every key press?


Unfortunately, no. But, the library is open source. So, you could try altering the code (you might have some luck with the .keyup event around line 3016)?


you can do that in this way

$("#myTable input").keypress( function(event){

//do here whatever you want here, ie (restrict minumu caracters in the field equals to 3)

if($("#myTable input").val().lengh > 3)
   $("#myTable input").change(); //necesary for jquery datatables execute his own event functions 
else
   //doNothing

}

Whit this you can restrict the search for a minimun input letters whit the idea of no break down the server whit searchs of just one letter on the search field

Well hope help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜