I only want the hits returned from Algolia to display when the user presses enter or if they hit the search icon on the input. I have got it so that only the specific hits are shown on enter using searchAsyouType = false
:
<ais-search-box [searchAsYouType]=false ></ais-search-box>
However the problem is that when nothing is entered all of the hits are displayed by default as shown below:
this is my code:
<ais-instantsearch [config]="searchConfig" >
<ais-search-box [searchAsYouType]=false ></ais-search-box>
<ais-hits >
<ng-template let-hits="hits">
<div *ngFor="let hit of hits">
<div class="bio">
hit: {{ hit.post_code }}
</div>
</div>
</ng-template>
</ais-hits>
</ais-instantsearch>
Anyone had this issue before? How do I hide all hits until enter/search icon is pressed?