Table view, collapse table headers

Hello, I’m trying to make a table, which has header sections, and inside data, multiple times. I wan’t to collapse all data inside a section.

Sadly corona doesn’t support any of this, one option is to mark the element as hidden, and then re build the table from scratch, without inserting hidden elements, and finally scroll to the original position, but this is obviously very bad, slow, and horrible user experience.

Another option would be to simply hide the required rows of a section, this works, but also I need to scroll up all elements that are below that row on the table! not to mention how much of a work this is, it has another issue, random crashes from inside corona table view widget code, which can’t be fixed, probably due to the requirement to access some table private variables.  And the other issue, the elements are not really hidden, they use space, and so you can scroll all the way to the bottom many rows below where the table actually ends.

So to me it looks like this is not possible with a tableView, should I look around for other alternatives? Like a scroll view, which will require me to write way much more code and will probably be not efficient since the table can be very large.

Another option, a scroll view which has tables inside? Each table would be each group, and collapsing one would just re create that single small table, however this seems unlikely to be a good idea.

Are there any other options, or ways to actually hide a table row, without removing it, which will achieve the same effect as deleting a row (scroll all the below elements one row up) ?

Other ideas? If I could just edit this jenkins code (the code made by corona, jenkins is in the crash path!) to add a handle to that crash.

If anyone is interested, the crash is: "/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_tableview.lua, line 604, attempt to index field ‘_view’ a nil value.

strange. I got same runtime error here… not sure why???

i found my error. my onRowTouch function has errors.

strange. I got same runtime error here… not sure why???

i found my error. my onRowTouch function has errors.