Titanium Widget to display a search bar.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets/iphone/images missing @1x image for iPad non retina Aug 25, 2016
controllers Fixed title position. Mar 2, 2017
styles Fill width on iPad Aug 25, 2016
views Added id to searchbar title container Mar 2, 2017
LICENSE Added license Jul 26, 2016
README.md IC Jul 26, 2016
widget.json Bump version Aug 25, 2016

README.md

Ti.Searchbar

com.caffeina.titanium.searchbar

Titanium Widget to display a search bar.

image

Installation

Via Gittio

gittio install com.caffeina.titanium.searchbar

Via Github

Download the latest release, and add in your config.json, under dependencies:

"dependencies": {
    "com.caffeina.titanium.searchbar": "*"
}

Fully stylable via TSS

Watch the widget.tss file for all options and override the rules with ID instead of class.

Usage

In you XML file:

<TitleControl>
    <Widget id="searchBar" src="com.caffeina.titanium.searchbar" title="Caffeina" />
</TitleControl>

In your JS file:

$.searchBar.on('change', function(e) {
    // Filter your data using e.value
})

Constructor options

animationsDuration (Number, default: 400)

The duration of the animations.

title (String, default: Ti.App.name)

The title for the label.

API

.setSearchMode()

Set the UI in search mode.

.setTitleMode()

Set the UI in title mode.