i'm using Titanium to develop a dictionary. I have a Tableview and the values of the rows are loaded from SQLite local database. I used the "SearchBar" component of Titanium and linked it to the tableview using the native property in Titanium. But the problem is: the filter is not anchored to the beginning of the string. So typing "ha" in the text box will include rows titled 'Harold' and 'Harvard', but also 'Sharon' and 'Jonathan'. And this was mentioned in the API docs of Appcelerator (http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableView.filterAttribute-property.html) Any ideas to resolve that?
You need to implement custom search code for quick solution. So, do not use TableView's "search" and "filterAttribute" property. You can create a SearchBar on TableView's headerView and make custom search function with using SearchBar "return" and "change" events.