Can you turn off keypress/keyup event on setting the defaults of a datatable filter?

Can you turn off keypress/keyup event on setting the defaults of a datatable filter?

CCoreilCCoreil Posts: 1Questions: 1Answers: 0

I have been trying to find out if, when setting the defaults for a DataTable, there was a way to prevent the filter having the events that cause the filter/search bar to query on keypress/keyup/input(these are the events I would want to prevent from being set). Any help is appreciated.

Answers

  • kthorngrenkthorngren Posts: 21,300Questions: 26Answers: 4,945
    edited July 2018

    This example shows how to create your own event for the global search input.
    http://live.datatables.net/jorexujo/1/edit

    Notice the use of .off() to turn off the default event handlers then .on() to create your own event handler.

    Kevin

This discussion has been closed.