JSFiddle - React, Tailwind, and code Playground

by martinschaer

HTML

<input type="text" id="searchGamesKeyword" class="searchGamesTextBox" name="searchGamesKeyword" onkeyup="testField(this);" onchange="testField(this);" />

JavaScript

function testField(f)
{
    var t,c,i=0,o='',x="value",v=f[x],l=v.length;
    while(i<l){t=v[i++];if(t!='*')o+=t;else c=1}
    if(c)f[x]=o
}