I was given the following code
<mat-form-field appearance="fill" style="margin: 0px 20px;font-size:13px;">
<input matInput type="text" aria-label="Number" placeholder="{{'Home.search' | translate }}"
[formControl]="myControl" [matAutocomplete]="auto" (ngModelChange)="getByKeyword($event)">
<mat-option *ngFor="let testCity of testCities" [value]="testCity.city"
(click)="testFunction(testCity.city, testCity.countryIso, testCity.cityId)">
I want to know, is there a way to call "testFunction" without (click) but instead with something that detects that the input field is no longer hovered or with each instance of new letter typed?