title: Clearing Datalist with (focus) not working in Angular
body: <p>I have a datalist to make a selection, which works fine. However, I want the text inside the input to clear when the user clicks back on it. Right now the text remains and has to be manually erased to see the original list.
  <a href="https://i.stack.imgur.com/NTmml.png" rel="nofollow noreferrer">example</a></p>
  <p>I am using Angular 12. I am trying to use the focus to do this. Here is my HTML:</p>
  <pre><code> &lt;input type=&quot;text&quot; list=&quot;clinics&quot; class=&quot;form-control&quot; formControlName=&quot;preferredClinic&quot; (focus)=&quot;clearPreference()&quot; placeholder=&quot;Search...&quot;&gt;
   &lt;datalist id=&quot;clinics&quot;&gt;
        &lt;option value=&quot;Unsure/No preference&quot;&gt;&lt;/option&gt;
        &lt;option *ngFor=&quot;let clinic of clinicList&quot; [value]=&quot;clinic&quot;&gt;{{clinic}}&lt;/option&gt;
   &lt;/datalist&gt;
  </code></pre>
  <p>and this is the function:</p>
  <pre><code>  clearPreference(){
      this.formValue.value.preferredClinic = &quot;&quot;;
      console.log(&quot;This has gained focus&quot;);
    }
  </code></pre>
  <p>The console logging works, so I know the (focus) is triggering, but it isn't clearing the input field. Any idea what I'm doing wrong?</p>