JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' id='text_id' ></input>
JavaScript
function myFunction() {
var filter = $("#text_id").val();
var query = "select * from table";
var found;
if (query.match(filter) != -1) {
found = true;
}
else{
found = false;
}
//Do something
}
$("#text_id").bind('keyup', function()
{
myFunction();
});