[TIMOB-3306] TiAPI: Ti.UI.TableViewRow hide()/show() doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2016-09-14T08:51:30.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | api |
Reporter | skypanther |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:41:48.000+0000 |
Updated | 2017-03-23T21:50:06.000+0000 |
Description
I need to be able to hide/show table view rows. The docs say hide() and show() exist, but they have no effect. Setting height=0 or visible=false (both in the docs) also do not work.
Alternatively, add support for deleteRow(tblRowObjectReference) and insertRowAfter(tblObjectReference) rather than by index number.
I need to be able to hide/show the same table row based on user's other selections. User selects a product, related options in a table need to hide/show as a result. But if they switch back, I need those original selections back in the same order. Using indexes gets very complex and all my attempts just result in exceptions/crashes.
Using Ti SDK 1.6.0 tested on both iOS 4.2 simulator and Android 2.1 SDK emulator.
Tested on a Samsung Galaxy S2 and on the iOS simulator using TiSDK 2.2.0v20120906100912, issue still valid. insertRowAfter/inserRowBefore have both been implemented, according to the docs: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.TableView-method-insertRowAfter I tested tableViewRow.hide() and it doesn't work on iOS and Android, nothing happens. tableViewRow.visible = false also doesn't work on iOS but hides the label on Android. Test code:
I also miss this this "feature". Setting visible=false on a tableviewrow does have no effect. It should.
Any update here?? Can anyone suggest alternate solution pls
This is not normal. More than two years old bug. Again lost time with workaround.
Searching for a solution to this issue shows so many Q&A tickets open and comments from frustrated users. Really don't understand why this hasn't been given higher priority...
I know this is a really old ticket, but is there any chance this is going to be looked at? Thanks!
The
Ti.UI.TableView
API wraps theUITableView
on iOS and theandroid.widget.ListView
on Android. Both API's don't work with hiding and showing rows. Instead, they offer an API that we also use to hide and show API's: - To hide a row, use [deleteRow](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-method-deleteRow) - To show a row, use [deleteRowBefore](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-method-insertRowBefore) or [insertRowAfter](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-method-insertRowAfter) That's the proper way to go. The main reason for that (nativ behavior) is that the section- and item-indexes need to stay in sync. By using the above methods, this is guaranteed. Thanks!Closing ticket with reference to the above comment.