title: How can i remove item from jquery ui autocomplete rendered list
body: <p>i want to remove <code>item</code> from <code>jquery-ui autocomplete</code> rendered list</p>
  
  <p>let say the item is <strong>compton</strong></p>
  
  <p><strong>Question</strong>: i want to remove <code>item</code> "compton" once it is rendered from outside <strong>NOT from</strong> helper functions like <code>select,create,open</code> etc</p>
  
  <p><strong>Below is my code:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> $(function() {
      var availableTags = [
          "john",
          "khair",
          "compton",
          "Jordan",
          "Micheal",
          "Peter"
      ];
      
     $( "#tags" ).autocomplete({
          source: availableTags
     }).focus(function () {
           $("#tags").autocomplete("search");
      });
     
     // logic to remove item "compton" must reflect in rendered ui
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet"/&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"&gt;&lt;/script&gt;
  
  
  &lt;div class="ui-widget"&gt;
  &lt;label for="tags"&gt;Search: &lt;/label&gt;
  &lt;input id="tags"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>