Description
When using a SearchBar if the list of suggestions will be oriented *above* (i.e. the searchbar is in the bottom half of the screen) the searchbar then the app will crash when entering a search term.
This occurs when a SearchBar is added to a ListView or TableView
Error is thrown on the clear call here
https://github.com/appcelerator/titanium_mobile_windows/blob/66ccc0a080360d147dd2b59c748a075b87107233/Source/UI/src/SearchBar.cpp#L62
var _window = Ti.UI.createWindow({ backgroundColor: 'green'});
var searchBar = Ti.UI.createSearchBar();
var data = [];
for (var i = 0; i < 25; i++) {
data.push({ title: Row ${i}
});
}
var tableView = Ti.UI.createTableView({
search: searchBar,
data: data,
top: '80%'
});
_window.add(tableView);
_window.open()
Steps to reproduce
Add the above to an existing app.js and build for a Windows target
Enter some text into the searchbar
Actual
App will throw the below error
[ERROR] : ----- Titanium Javascript Runtime Error -----
[ERROR] : In undefined: undefined,undefined
[ERROR] : Message: Uncaught Error: undefined
Expected
App should not throw an error search should function as normal
master: https://github.com/appcelerator/titanium_mobile_windows/pull/1043
[~gmathews][~eharris] Master is merged, Waiting for 6_2_X back-port
I will push backports for 6_2_X soon.
6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1058
[~smohammed] Backported to 6_2_X. No tests needed for 6_2_X because currently
6_2_X
branch andmaster
are pretty much same. Should be ok to close this ticket.Verified fix in SDK Version 7.0.0.v20170815065413 and SDK Version: 6.2.0.v20170815130745 Test and other information can be found at: Master: https://github.com/appcelerator/titanium_mobile_windows/pull/1043 6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1058