title: search filter is not working properly in reactjs
body: <p>I am trying to filter the data from the table but it is not working properly. on first keyboard click it is showing the whole data from the table. when i click the second letter then it is filtering the data taking the first letter. Also the back keypress is not working.</p>
  <p>const [searchInput, setSearchInput] = useState(&quot;&quot;);</p>
  <pre><code>const searchTable = (e: any) =&gt; {
  let tdata = { columns:tableData.columns,data_source:[]}
  setSearchInput(e)
  if(e){
    if(tableData &amp;&amp; tableData.data_source.length &gt; 0){
      const filterData = tableData.data_source.filter((item:any) =&gt; {
        return Object.values(item).join('').toLowerCase().includes(searchInput.toLowerCase())
      })
      tdata.data_source = filterData
      console.log(&quot;tata&quot;,tdata)
      setTableData(tdata)
    }
  }else{
    getTableGoData({});
  }
  </code></pre>
  <p>};</p>
  <pre><code>  &lt;Input
          onChange={(e) =&gt; searchTable(e.target.value)}
          placeholder=&quot;Search&quot;
          value = {searchInput}
        /&gt;
  </code></pre>