Search bar in table in wordpress


i used this code in table ,plugin. it checks data through only one column , i want it code use all columns. Anyone can help me plz?

const searchFun = () =>{
let filter =document.getElementById(‘myInput’).value.toUpperCase();
let myTable = document.getElementById(‘myTable’);
let tr = myTable.getElementsByTagName(‘tr’);
for(var i=0; i<tr.length; i++){
let td = tr(i).getElementsByTagName(‘td’)(0);

         if(td){
             let textvlaue = td.textContent || td.innerHTML;
             if(textvlaue.toUpperCase().indexOf(filter)>-1){
                 tr(i).style.display = "";
             }else{
                 tr(i).style.display="none";
             }
         }
     }
     
     
 }