Ionic2 SearchBar confusion, onInput called after firing onClear, onCancel


#1

Hi All,

I have been following the tutorial at ionic2 SearchBar to work on the filter functionality.

The question is, I am not able to figure out how to get onCancel and onClear to work.

Steps:

  1. Enter some keywords in SearchBar. It calls the onInput event and I get the value from searchItem.target.value unlike in tutorial which just uses searchItem.value

  2. Now i try to click on clear “x” or Cancel button and it calls the onClear/onCancel event immediately followed by onInput event. And during this call, it does not find the searchItem.target.value and results in undefined due to which it breaks the functionality.

Can anyone provide more in depth details on how this works and also why are the documentation not upto date on the ionic website?


#2

Similar problem here, sometime ionBlur is called before ionInput.
Any news?


#3

Here the problem.
Randomly, ionInput is called after ionBlur on exiting from textarea of ion-searchbar.
ps: exit = closing keyboard or clicking out, losing focus.

@mhartington is an issue or what?