title: Blazor InputFile reset/clear value - statehaschanged() not working
body: <p>I have a component using an Blazor InputFile component as a sub-component.</p>
  <p>When I select a file the OnChange handler is called as expected. However, if I select the same file twice the OnChange handler is not called again (which I guess is as intended since the selection did not change, however my use case needs this).</p>
  <p>So, I figure if I can select a file and get a call to the OnChange handler and in the OnChange handler &quot;reset&quot; the selected file, then I should get a new call to the handler even if the same file is selected again.</p>
  <p>I cant figure out how to reset the file selection in InputFile (sub)component. Calling <code>this.StateHasChanged()</code> in the handler doesn't cause the InputFile component to re-render.</p>
  <p>Is this possible to do without JSInterop and manually setting the value-field of the DOM input element to &quot;&quot; (would that even work)?</p>
  <p>My component:</p>
  <pre><code>@using stuff;
  
  &lt;div class=&quot;drag-drop-area&quot;&gt;
      Drag and drop file here
      &lt;InputFile OnChange=&quot;@OnInputFileChange&quot;&gt;&lt;/InputFile&gt;
  &lt;/div&gt;
  
  @code {
  
      [Parameter]
      public String SomeParam { get; set; } = &quot;&quot;;
  
      private async Task OnInputFileChange(InputFileChangeEventArgs e) {
          // do stuff with file
  
          // do _something_ here to reset InputFile
  
          this.StateHasChanged(); //&lt;-- this doesn't cause InputFile re-render
      }
  </code></pre>
  <p>My attempts to do this so far includes:</p>
  <ul>
  <li>Following various tips/tricks related to this. StateHasChanged(), i.e.
  <ul>
  <li><code>await Task.Delay(1);</code></li>
  <li><code>await InvokeAsync(StateHasChanged);</code></li>
  </ul>
  </li>
  <li>Adding values to InputFile using <code>AdditionalAttributes.Add(..)</code> to see if that could force a re-render</li>
  <li>Looked at dynamically adding the InputFile component using RenderFragment, but I cant pass the OnChanged param (handler) when creating a new instance of InputFile in code, which means I wont the a callback with InputFileChangeEventArgs</li>
  <li>Looked at wrapping the InputFile in a EditForm to reset the form (Blazor EditForms apparently doesnt have reset functionality?)</li>
  <li>[EDIT] Used both Task and void for OnInputFileChange</li>
  </ul>