Search on Typing NEW Bootstrap 4.5 theme
Simple Search on Typing
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table("payments"); echo $xcrud->render(); ?> <script> $( document ).ready(function() { console.log( "ready!" ); $(".xcrud-search-toggle").click(); $(document).on("ready xcrudafterrequest", function(event, container) { var typingTimer; //timer identifier var doneTypingInterval = 1000; //time in ms, 5 seconds for example var $input = $('.xcrud-searchdata'); //on keyup, start the countdown $input.on('keyup', function () { clearTimeout(typingTimer); typingTimer = setTimeout(doneTyping, doneTypingInterval); }); //on keydown, clear the countdown $input.on('keydown', function () { clearTimeout(typingTimer); }); //user is "finished typing," do something function doneTyping () { $( "a[data-search='1']" ).click(); } $input.focus(); var tmpStr = $input.val(); $input.val(''); $input.val(tmpStr); if (container) { try{ $('.tab-pane').find("select").select2(); }catch(e){ } } else { try{ $('.tab-pane').find("select").select2(); }catch(e){ } } $("#field_client_id").change(function(){ console.log("selected"); $("#save-button").click(); }); }); </script>
Payments
# | Customernumber | Checknumber | Paymentdate | Amount | |
---|---|---|---|---|---|
1 | 209 | PH785937 | 04.05.2004 00:00:00 | 36069.26 | View Edit Remove |
2 | 211 | BJ535230 | 09.12.2003 00:00:00 | 45480.79 | View Edit Remove |
3 | 216 | MM342086 | 14.12.2003 00:00:00 | 40473.86 | View Edit Remove |
4 | 219 | BN17870 | 02.03.2005 00:00:00 | 3452.75 | View Edit Remove |
5 | 219 | BR941480 | 18.10.2003 00:00:00 | 4465.85 | View Edit Remove |
6 | 227 | MQ413968 | 31.10.2003 00:00:00 | 36164.46 | View Edit Remove |
7 | 227 | NU21326 | 02.11.2004 00:00:00 | 53745.34 | View Edit Remove |
8 | 233 | II180006 | 01.07.2004 00:00:00 | 22997.45 | View Edit Remove |
9 | 239 | NQ865547 | 15.03.2004 00:00:00 | 80375.24 | View Edit Remove |
10 | 240 | IF245157 | 16.11.2004 00:00:00 | 46788.14 | View Edit Remove |