{ "id": "146163", "key": "TIMOB-18736", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2015-04-01T17:51:33.000+0000", "created": "2015-03-24T12:00:48.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "footerview", "headerview", "height", "section", "tableView" ], "versions": [ { "id": "16711", "description": "Release 3.5.1", "name": "Release 3.5.1", "archived": false, "released": true, "releaseDate": "2015-03-06" } ], "issuelinks": [ { "id": "47001", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "146162", "key": "TIMOB-18735", "fields": { "summary": "iOS: SearchBar covered section header when using Grouped Table Style", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:31:41.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem description\r\nSet new tabledata during the focus event of the searchbar to force a table refresh.\r\nAfter the refresh the height of the headerView an the footerView of the section is wrong\r\n\r\nh2. Steps to reproduce\r\n1. Create a tableview with sections and a searchbar\r\n2. Add a headerView and footerView with height 1 to the sections\r\n3. add add focus eventlistener to the searchbar\r\n4. modify data and set it to the table to force a table refresh\r\n\r\n\r\nh2. Test case\r\n{code:lang=javascript|title=app.js}\r\n(function() {\r\n\tTi.UI.backgroundColor = 'white';\r\n\r\n\tvar win = Ti.UI.createWindow({backgroundColor : '#ffffff'});\r\n\tvar table;\r\n\tvar view = Titanium.UI.createView({backgroundColor : \"#FFFEEE\",top : 0});\r\n\t\r\n\tvar section1 = Titanium.UI.createTableViewSection();\r\n\tvar section2 = Titanium.UI.createTableViewSection();\r\n\r\n section1.headerView = Ti.UI.createView({height: 2, backgroundColor: '#ff0000'}); //red \r\n section2.headerView = Ti.UI.createView({height: 2, backgroundColor: '#00ff00'}); //green \r\n \r\n section1.footerView = Ti.UI.createView({height: 2, backgroundColor: '#ff0000'}); //red \r\n section2.footerView = Ti.UI.createView({height: 2, backgroundColor: '#00ff00'}); //green\r\n \r\n\tsection1.add(Ti.UI.createTableViewRow({title : \"Test Row 1\"}));\r\n\tsection2.add(Ti.UI.createTableViewRow({title : \"Test Row 2\"}));\r\n\t\t\r\n\tvar search = Titanium.UI.createSearchBar();\r\n\t\r\n\tsearch.addEventListener('focus', function(e){\r\n\t\ttable.setData(table.data);\r\n\t});\r\n\t\r\n\ttable = Ti.UI.createTableView({\r\n\t\tsearch : search,\r\n\t\tdata : [section1,section2],\r\n\t\tstyle : Ti.UI.iPhone.TableViewStyle.GROUPED\r\n\t});\r\n\r\n\tview.add(table);\r\n\twin.add(view);\r\n\t\r\n\twin.open();\r\n})();\t\r\n{code}", "attachment": [ { "id": "54590", "filename": "searchbar-ignore-view-height.png", "author": { "name": "Esche", "key": "esche", "displayName": "Markus Eschenbach", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-24T12:02:30.000+0000", "size": 31839, "mimeType": "image/png" }, { "id": "54591", "filename": "searchbar-ignore-view-height-focus.png", "author": { "name": "Esche", "key": "esche", "displayName": "Markus Eschenbach", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-03-24T12:02:30.000+0000", "size": 34410, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Wrong height of the headerview and footerview when SearchBar Get Focus, if using Grouped Table Style", "creator": { "name": "Esche", "key": "esche", "displayName": "Markus Eschenbach", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "Esche", "key": "esche", "displayName": "Markus Eschenbach", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK version: 3.5.1 GA\r\nPlatform & version: & iOS 8.2\r\nDevice Details: iPhone 5 and 5S and simulator\r\nHost Operating System: OS X 10.9 & OS X 10.10\r\nTitanium Studio version: 3.4.1.201410281727", "comment": { "comments": [ { "id": "348144", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Use of the searchView API is not recommended with TableViewStyle.GROUPED. That is because the search results are presented in a tableView with style TableViewStyle.PLAIN.\r\nIf you do wish to use a grouped tableView please see the [searchText|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView-property-searchText] API in ListView. \r\nUse that in conjunction with [keepSectionsInSearch|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView-property-keepSectionsInSearch] property.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-01T17:51:00.000+0000", "updated": "2015-04-01T17:51:00.000+0000" }, { "id": "415008", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:31:41.000+0000", "updated": "2017-03-22T21:31:41.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }