Hi, this seems like a pretty obvious thing but I can’t seem to figure out how to do it. Perhaps it’s the recent lack of sleep but I’ve been struggling with it for a few hours now to no avail.
How can you render two different rows in the same tableView using the new 2.0 widgets? The way it works as I see it is that you assign one row render listener to the tableView, and this will be called each time a row is rendered? But how can you have the tableView render different types of rows depending on something dynamic?
Previously, I had a for loop that iterated through a table and would create an onRender function for each iteration and then insert that into the tableView. Since you specified the onRender listener inside the :insertRow method, you could create whatever type of row render you wanted on the fly. Now we can only use one “global” listener for all rows, so how can you alter this listener to render different types of rows?
I tried using the event.index variable inside the listener to try determine what row should be where, but things wont be this static all the time. Sometimes I’ll be fetching different kind of data from my server and it wont always be organized the same way.
Sorry if it sounds messy, blaming it on lack of sleep Basically, I think it could be fixed by somehow being able to pass custom variables to the onRowRender listener, but is this even possible somehow?