Tabris.js Widgets: SearchAction

This widget displays a search text field with dynamic proposals when selected. You can fill the proposals list when the widget is created, or you can use onInput event to load proposals dynamically. After the user submits a search query, listen to the onAccept event to load search results on the page.

Here is a simple code example:

Note that SearchAction is an Action child class and therefore can’t be appended directly to the contentView. It can be displayed only as a part of NavigationView. If you feel like you want to see a search bar inside the page body, TextInput widget will help.

And here is how you can use SearchAction with proposals list:

You can also start showing proposals when more than N characters are entered or load suggestions list from a remote data source.

For more detailed information about the widget, use the SearchAction documentation page.