Ionic 2 ion-searchbar outputs events not working

I can’t make the output events ionInput and ionCancel work on a ion-searchbar.

Probably I’m missing something. This *ion-searchbar is inside a page/tab.

I’m trying to achieve this:
<ion-searchbar (ionInput)="onSearch($event)"> </ion-searchbar>

I’m using a workaround and is working:
<ion-searchbar (keyup)="onSearch($event)" </ion-searchbar>

But I also need to use the ionCancel output event.

This is the full code:
Gist

1 Like

I am having the exact same problem. For ionInput i used the exact same work around. Now i am trying to use ionCancel but the event binding is not working.

I’m working with RC2.

In my case ionInput works fine, but not ionCancel. Any news on this issue?

Hi miukimiu,

I also couldn’t figure out how to make the ionCancel event work. But, have found a workaround & that is if you use ionClear method in conjunction with ionCancel then the ionClear will work for you.

Thanks. Please feel free to reply back if I’m unable to convey my idea.

1 Like