Filter column just in time using serverSide
Filter column just in time using serverSide
bor1904
Posts: 5Questions: 1Answers: 0
Hi,
I try to implement column filtering without pressing Enter key, but I cant find predefined option for this. I use serverSide processing.
Pressing enter is not comfortable each time.
Can somebody help me ?
thx!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Please post the code you have for the column search.
Kevin
Hi,
I dont have any special code dedicated for this.
I want to achive global effect on all columns.
Initiation code:
Maybe I don't understand the issue but by default Datatables sends an Ajax request to the server for each key stroke in the Global Search box. You can see this in this example:
https://datatables.net/examples/data_sources/server_side.html
Is this the behavior you are trying to achieve?
Kevin
I know that the global search box working on every keypress but I want to achive the same effect on column search boxes.
Like I asked before please post your code for the column searches. It is not a default code that comes with Datatables. Likely you will need to change the event handler from using 'change' to 'keyup'.
Kevin
I dont have custom modyfication in this area but i used plugin.
https://datatables.yajrabox.com/eloquent/multi-filter-select
I think that the normal datatables implementation have column search triggered on keypress but default solution for column searching witch serverSide procesing is triggered on change.
I try to change this behavior to "on keypress"
This is the custom code it has for the column search:
You can change line 6 to use
keyup
event, for example:.on('keyup', function () {
Kevin
ok, Im blind
thank U!