How to use Virtual Keyboard jQuery Plugin in Search fillter

How to use Virtual Keyboard jQuery Plugin in Search fillter

bsevenbseven Posts: 1Questions: 1Answers: 0

Please help suggest a way to make it work.

thank you very much

this example code to use

`


<link rel="stylesheet" href="path/to/jquery.keyboard.css">


<input type="text" id="searchInput" placeholder="Search">

$(document).ready(function() { // Initialize DataTable var table = $('#example').DataTable(); // Initialize Virtual Keyboard on the search input $('#searchInput').keyboard({ // Configure keyboard options as needed }); // Handle keyboard input and trigger search $('#searchInput').on('keyboardChange', function(e, keyboard, el) { var searchValue = el.value; // Perform datatable search using the searchValue table.search(searchValue).draw(); }); });

`

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    You mean a custom virtual keyboard? I'm not sure why you would, since the browser's virtual keyboard will appear as soon as you focus on the input element (assuming you are using a mobile). What keyboard library are you using? Perhaps you can create a test case on JSFiddle or https://live.datatables.net .

    Allan

Sign In or Register to comment.