Access to Searchbar's Input

Hello there.

I am triyng to use expandable Searchbar with my own custom search function. So, custom-search is enabled, and I am listening to searchbar:search event. Everything works well, but on Android I cannot hide keyboard after focusing on searchbar without hiding searchbar and cancelling search results.

I want to hide keyboard when user presses the Enter key, but there is no access to Input inside it. @keypress.enter event on the bar element itself didn’t work. How to solve this?


try with cordova-plugin-ionic-keyboard


Hide the keyboard

Call this method to hide the keyboard


Just use native handler on searchbar like @keypress.enter.native="..."

It helped, thank you!