title: Supplying MudBlazor Autocomplete with content from a service
body: <p>I have here an example of an <a href="https://mudblazor.com/components/autocomplete" rel="nofollow noreferrer">Autocomplete</a> taken from the MudBlazor component library documentation that offers options as I type from a pre-defined list of possible values:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;MudAutocomplete T=&quot;string&quot; Label=&quot;Select US state&quot; @bind-Value=&quot;selectedValue&quot; SearchFunc=&quot;@Search&quot; /&gt;
  
  @code {
      private string selectedValue;
      private string[] states =
      {
          &quot;Alabama&quot;, &quot;Alaska&quot;, &quot;American Samoa&quot;, &quot;Arizona&quot;,
          &quot;Arkansas&quot;, &quot;California&quot;, &quot;Colorado&quot;, &quot;Connecticut&quot;,
          &quot;Delaware&quot;, &quot;District of Columbia&quot;, &quot;Federated States of Micronesia&quot;,
          &quot;Florida&quot;, &quot;Georgia&quot;, &quot;Guam&quot;, &quot;Hawaii&quot;, &quot;Idaho&quot;,
          &quot;Illinois&quot;, &quot;Indiana&quot;, &quot;Iowa&quot;, &quot;Kansas&quot;, &quot;Kentucky&quot;,
          &quot;Louisiana&quot;, &quot;Maine&quot;, &quot;Marshall Islands&quot;, &quot;Maryland&quot;,
          &quot;Massachusetts&quot;, &quot;Michigan&quot;, &quot;Minnesota&quot;, &quot;Mississippi&quot;,
          &quot;Missouri&quot;, &quot;Montana&quot;, &quot;Nebraska&quot;, &quot;Nevada&quot;,
          &quot;New Hampshire&quot;, &quot;New Jersey&quot;, &quot;New Mexico&quot;, &quot;New York&quot;,
          &quot;North Carolina&quot;, &quot;North Dakota&quot;, &quot;Northern Mariana Islands&quot;, &quot;Ohio&quot;,
          &quot;Oklahoma&quot;, &quot;Oregon&quot;, &quot;Palau&quot;, &quot;Pennsylvania&quot;, &quot;Puerto Rico&quot;,
          &quot;Rhode Island&quot;, &quot;South Carolina&quot;, &quot;South Dakota&quot;, &quot;Tennessee&quot;,
          &quot;Texas&quot;, &quot;Utah&quot;, &quot;Vermont&quot;, &quot;Virgin Island&quot;, &quot;Virginia&quot;,
          &quot;Washington&quot;, &quot;West Virginia&quot;, &quot;Wisconsin&quot;, &quot;Wyoming&quot;,
      };
  
      private Task&lt;IEnumerable&lt;string&gt;&gt; Search(string value)
      {
          return Task.FromResult(states.Where(x =&gt; x.Contains(value, StringComparison.InvariantCultureIgnoreCase)));
      }
  
  }
  </code></pre>
  <p>This is exactly what I need for my project. But how do I get the values on demand from a web api while the user types? Also, is there a way to influence how the options are presented in the drop-down list?</p>