title: Search bar in modal-body for auto search based on text entered
body: <p>Here is the html code:</p>
  
  <pre><code>&lt;div class="modal-dialog"&gt;
  
          &lt;!-- Modal content--&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;{{selectedClassName}}&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body errorDetailPannel"&gt;
                  &lt;table class="table table-sm table-inverse table-responsive table-striped"&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;
                              &lt;th&gt;Line&lt;/th&gt;
                              &lt;th&gt;Review Feedback&lt;/th&gt;
                          &lt;/tr&gt;
                          &lt;input type="text" class="form-control search-box" placeholder="Search"&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;
                          &lt;tr ng-repeat="eachClass in selectedClassErrDetails"&gt;
                              &lt;td&gt;{{eachClass.lineNumber}}&lt;/td&gt;
                              &lt;td&gt;{{eachClass.reviewFeedback}}&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>The JS File:</p>
  
  <pre><code>function OrderFormController($scope,$http){
  
      var urlString = window.location.href;
      var urlParams = parseURLParams(urlString);
  
      var date = urlParams['date'];
  
      var jsonData = $.ajax({
          url: "**********************************************,
          dataType: "json",
          crossDomain: true,
          async: false
      }).responseText;
  
      var parsed = JSON.parse(jsonData);
      $scope.selectedClassErrDetails = [];
      $scope.selectedClassName = "";
      $scope.showErrorDetails = function(classNameKey){
          $scope.selectedClassName = classNameKey;
          $scope.selectedClassErrDetails = $scope.sampleJSON[classNameKey];
          angular.element('#myModal').modal('show');
      };
  
      $scope.sampleJSON = parsed;
  
  };
  
  function parseURLParams(url) {
      var queryStart = url.indexOf("?") + 1,
          queryEnd   = url.indexOf("#") + 1 || url.length + 1,
          query = url.slice(queryStart, queryEnd - 1),
          pairs = query.replace(/\+/g, " ").split("&amp;"),
          parms = {}, i, n, v, nv;
  
      if (query === url || query === "") return;
  
      for (i = 0; i &lt; pairs.length; i++) {
          nv = pairs[i].split("=", 2);
          n = decodeURIComponent(nv[0]);
          v = decodeURIComponent(nv[1]);
  
          if (!parms.hasOwnProperty(n)) parms[n] = [];
          parms[n].push(nv.length === 2 ? v : null);
      }
      return parms;
  }
  </code></pre>
  
  <p>I have introduced an search panel at the top of my modal, but it does not work. I dont need a submit button, but when a text is entered in the search box it should filter the result of the moday-content based on the matching phrase in the search box. In the image below I gave asd but it did not filter the result.</p>
  
  <p><a href="https://i.stack.imgur.com/7vmmk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7vmmk.png" alt="enter image description here"></a></p>
  
  <p><strong>Modifed JS:</strong></p>
  
  <pre><code>function searchFunction() {
      var input, filter, table, tr, td, i;
      input = document.getElementById("searchBar");
      filter = input.value.toUpperCase();
      table = document.getElementById("errorTable");
      tr = table.getElementsByTagName("tr");
      for (i = 0; i &lt; tr.length; i++) {
          td = tr[i].getElementsByTagName("td")[1];
          if (td) {
              if (td.innerHTML.toUpperCase().indexOf(filter) &gt; -1) {
                  tr[i].style.display = "";
              } else {
                  tr[i].style.display = "none";
              }
          }
      }
  }
  </code></pre>