Skip to content

Instantly share code, notes, and snippets.

@MotiurRahman
Created October 11, 2019 13:35
Show Gist options
  • Save MotiurRahman/718268b024543f9a7022428940259430 to your computer and use it in GitHub Desktop.
Save MotiurRahman/718268b024543f9a7022428940259430 to your computer and use it in GitHub Desktop.
TableView with SearchBar
var window = Ti.UI.createWindow({});
var searchView = Titanium.UI.createSearchBar({
barColor : '#000',
showCancel : true,
height : 43,
top : 20,
});
var tbl_data = [{
title : 'Row 1'
}, {
title : 'Row 2'
}, {
title : 'Row 3'
}];
var tableView = Ti.UI.createTableView({
search : searchView,
data : tbl_data
});
searchView.addEventListener('change', function(e) {
Ti.API.info(e.value);
});
window.add(tableView);
window.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment