i trying to access the searchbar in my component.
i´m using subnavbar/searchbar.
in the md theme i get a submit-event on ios theme i dont get a event.
//do stuff e.g with $$(e.target).find('.searchInput').val().trim();
For submit event to work correctly it must have input type=submit
how can i catch the event on “search” (not on typing what on:search in app.searchbar.create does)
in the old version i could do this on both themes with .submit(function…)
It is recommended to use callbacks for that like
onClear, etc. http://framework7.io/docs/searchbar.html#search-bar-parameters
yeah but there we missing an important callback.
for example look at the gmail app:
you can search there your whole mailbox. but he only searches after you press the icon on the corner.
that is made because this search is such a heavy operation you dont wanna do this on type.
we also have an api-search which we wanna trigger only on submit.
(in the 1.* version submit works)
here is a screen when the gmail app begins to search “heavy”
Then, just enable
customSearch: true in searchbar settings, add
<input type="submit"> in searchbar form and handle all events manually, e.g.
i found the “problem”
(because searchbar is not part of page in ios theme )