[TIMOB-25850] iOS: SearchBar doesn't show Bookmark button when set on creation in TableView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-08-24T17:30:31.000+0000 |
Affected Version/s | Release 7.1.0 |
Fix Version/s | Release 7.5.0 |
Components | iOS |
Labels | qe-7.1.0 |
Reporter | Eric Wieber |
Assignee | Vijay Singh |
Created | 2018-03-08T20:48:57.000+0000 |
Updated | 2018-08-24T17:30:48.000+0000 |
Description
When showBookmark is set to true on creation of the searchbar and it is in a TableView, the bookmark button does not show.
*Steps to reproduce issue*
1. Create a new project with the below code
2. Run the project
*Expected Results*
The searchbar has the bookmark button shown
*Actual Results*
The searchbar does not have the bookmark button shown
*Notes*
The bookmark button can be toggled to show it, but the toggle has to be tapped twice, since it thinks it is being shown.
Also, if you just create a searchbar with showBookmark = true, then the button will show. Having the searchbar in the tableview does not show the bookmark button.
*Code*
Classic:
var win = Ti.UI.createWindow();
var searchBar = Titanium.UI.createSearchBar({
showBookmark: true
});
var table = Ti.UI.createTableView({
data: [{
title: "Toggle Bookmark button"
}],
search: searchBar
});
table.addEventListener('click', function(e){
searchBar.showBookmark = !searchBar.showBookmark;
});
win.add(table);
win.open();
Alloy:
index.xml
<Alloy>
<Window>
<TableView>
<SearchBar id="search" showBookmark="true"/>
<TableViewRow onClick="toggle" title="Toggle bookmark button"/>
</TableView>
</Window>
</Alloy>
index.js:
function toggle() {
$.search.showBookmark = !$.search.showBookmark;
}
$.index.open();
PR - https://github.com/appcelerator/titanium_mobile/pull/9932 Test Case -
*EDIT* - Changes of this PR is included in PR of TIMOB-25866.
*Closing ticket*, Verified fix in SDK Version:
7.4.0.v20180717131401
*FR Passed (Test Steps):*Created a titanium Application
Added the following code above in to the app.js
Ran the program
Able to see Bookmark button on creation
Pressed the toggle button
Able to see the bookmark toggle on/off
*Test Environment*