I have this code in component.html
<ais-instantsearch [config]=“config”>
<ais-search-box [placeholder]=“‘Type product name…’” #searchBox>
<ais-hits class=“position-absolute” *ngIf=“searchBox.state.query”>
<li *ngFor=“let hit of hits.slice(0, 5)” class=“ais-Hits-item”>
<a (click)=“selectProduct(hit)”>{{hit.product_name}}
In component.ts I also have this function
selectProduct(product: any) {
this.selectedProduct = {
product_id: product.product_id
};
this.product_name = product.product_name;
this.isDisabled = true;
}
I want to clear the ais-search-box input in function selectProduct(product: any)