algolia/angular-instantsearch

ais-search-box reset EventEmitter is not getting triggered

alabbas-ali opened this issue ยท 0 comments

Describe the bug ๐Ÿ›

I am trying to trigger a function call in my parent component when the reset button of ais-search-box component is triggered.
I just took a look at the component implementation here https://github.com/algolia/angular-instantsearch/blob/master/src/search-box/search-box.ts
it seems that there is an @Output() reset = new EventEmitter(); declared in the component.

so have tried something like

        <ais-search-box
            placeholder="{{ 'header.searchPlaceholder' | translate }}"
            [searchAsYouType]="true"
            resetTitle="{{ 'header.searchResetTitle' | translate }}"
            reset="reset($event)"
        ></ais-search-box>

but the function is not getting triggered when I click the reset button

To Reproduce ๐Ÿ”

Steps to reproduce the behavior:

https://codesandbox.io/s/musing-poitras-cufcmx?file=/src/app/app.component.html