Created
October 11, 2019 13:35
-
-
Save MotiurRahman/718268b024543f9a7022428940259430 to your computer and use it in GitHub Desktop.
TableView with SearchBar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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