title: Blazor not refreshing component
body: <p>[Blazor cliente-side hosted]</p>
  <p>I have a simple table loading data from API working fine... Now I need to apply a filter and reload the table to show new data/list;</p>
  <p><strong>SOLUTION IN END</strong></p>
  <p>index.razor</p>
  <pre><code>    @inherits PersonBase;
  
  //---show 3 items but after filter no change--    
  &lt;h2&gt;list size: @PersonList.Count()&lt;/h2&gt; 
  &lt;EditForm Model=&quot;@Obj &quot;&gt;
      &lt;div class=&quot;col-md-12&quot;&gt;
          &lt;div class=&quot;well&quot;&gt;
              &lt;table class='table borderless'&gt;
                  &lt;tr&gt;
                      &lt;td colspan=&quot;2&quot; style=&quot;text-align: right&quot;&gt;
                          &lt;InputText @bind-Value=&quot;@Search&quot; class=&quot;form-control input-sm&quot; style=&quot;width:200px;margin-bottom:0px&quot; type=&quot;text&quot; name=&quot;input3&quot; placeholder=&quot;Pesquisar por:&quot; /&gt;
                          &lt;button class=&quot;btn btn-info&quot; @onclick=&quot;@(() =&gt; LoadItems(@Search))&quot;&gt;
                              &lt;i class=&quot;fas fa-search&quot;&gt;&lt;/i&gt;
                          &lt;/button&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/EditForm&gt;
  
      &lt;table class=&quot;table&quot;&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Id&lt;/th&gt;
                  &lt;th&gt;Name&lt;/th&gt;
  
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              @foreach (var person in PersonList)
              {
              &lt;tr&gt;
                  &lt;td&gt;@person.Id&lt;/td&gt;
                  &lt;td&gt;@person.Name&lt;/td&gt;
              &lt;/tr&gt;
              }
          &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  <p>PersonBase.cs</p>
  <pre><code>namespace MyProject.Client.Pages.PersonComponent
  {
      public class PersonBase : ComponentBase
      {
          [Inject] public HttpClient Http { get; set; }
          [Inject] NavigationManager Navigation { get; set; }
  
          [Parameter] public string Search { get; set; } = string.Empty;
          protected IEnumerable&lt;Person&gt; Itens { get; set; }
          [Parameter] public List&lt;Person&gt; PersonList { get; set; }
          public int idObj;
  
          [Parameter] public Person Obj { get; set; }
  
          protected override async Task OnInitializedAsync()
          {
              Obj = new Person();
              await LoadItems(null); //--Loading all items
              
              Console.WriteLine(&quot;OnInitializedAsync =&gt; &quot; + PersonList.Count);
          }
  
          //--LOAD BY WEBAPI--
          protected async Task LoadItems(string search)
          {
              try
              {
                  var httpResponse = await Http.GetAsync($&quot;api/person/list/{search}&quot;);
  
                  if (httpResponse.IsSuccessStatusCode)
                  {
                      var responseString = await httpResponse.Content.ReadAsStringAsync();
  
                      PersonList = JsonSerializer.Deserialize&lt;List&lt;Person&gt;&gt;(responseString,
                      new JsonSerializerOptions()
                      {
                          PropertyNameCaseInsensitive = true
                      });
  
                      Itens = PersonList;
                      Console.WriteLine(&quot;LoadItems =&gt; PersonList =&gt; &quot; + PersonList.Count);
  
                      await InvokeAsync(() =&gt; StateHasChanged()).ConfigureAwait(false);
                  }
              }
              catch (Exception)
              {
                  throw;
              }
          }
      }
  }
  </code></pre>
  <p>PersonController.cs</p>
  <pre><code>    [HttpGet(&quot;list/{search}&quot;)]
      public async Task&lt;ActionResult&lt;List&lt;Person&gt;&gt;&gt; GetByAll(string search)
      {
          try
          {
          //--Loading all--
              if (string.IsNullOrEmpty(search))
              {
                  return await _context.Person
                      .AsNoTracking()
                      .Take(3)
                      .ToListAsync();
              }
              else
              {
              //--filtered--
                  return await _context.Person
                      .AsNoTracking()
                      .Where(n =&gt; n.Name.ToLower().Contains(search.ToLower()))
                      .Take(3)
                      .ToListAsync();
              }
          }
          catch (Exception)
          {
              throw;
          }
      }
  </code></pre>
  <p>But the table isn't loading new data. What can I try now?</p>
  <p><a href="https://i.stack.imgur.com/7Z6Zt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Z6Zt.jpg" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/FsgVi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FsgVi.jpg" alt="enter image description here" /></a></p>
  <p><strong>SOLVED</strong>:
  Problem was a controller without [FromQuery]:</p>
  <p>PersonControler.cs</p>
  <pre><code>[HttpGet]
  [Route(&quot;list&quot;)]
  public async Task&lt;ActionResult&lt;List&lt;Pessoa&gt;&gt;&gt; GetByAll([FromQuery]string search = &quot;&quot;)
  </code></pre>
  <p>Now I can:</p>
  <pre><code>var httpResponse = await Http.GetAsync($&quot;api/person/list?search={search}&quot;);
  </code></pre>
  <p>like said in: <a href="https://docs.microsoft.com/pt-br/aspnet/core/web-api/?view=aspnetcore-3.1" rel="nofollow noreferrer">https://docs.microsoft.com/pt-br/aspnet/core/web-api/?view=aspnetcore-3.1</a></p>