JSFiddle - React, Tailwind, and code Playground

HTML

<select>
 <option>text1</option>
 <option>text2</option>
 <option>text3</option>
 <option>text4</option>
</select>
<button onclick="show();">Show</button>
<button onclick="hide();">Hide</button>
<table id="myTable">
 <tr>
  <td>text1</td><td>....</td>
 </tr>
 <tr>
  <td>text2</td><td>....</td>
 </tr>
 <tr>
  <td>text3</td><td>....</td>
 </tr>
 <tr>
  <td>text1</td><td>....</td>
 </tr>
</table>

<script>
   function show() {
       var needle = $("select option:selected").text();
       $('#myTable td').each(function() {
            if ($(this).text() === needle) $(this).show();
       });
   }
   function hide() {
       var needle = $("select option:selected").text();
       $('#myTable td').each(function() {
            if ($(this).text() === needle) $(this).hide();
       });
   }
</script>

JavaScript

$(".hide").on("click", function(){
  $(b).show();              
 });