tableView params category bug

local widget=require("widget") local tableView local function onRowRender(event) local row=event.row local params=row.params local isCategory=row.isCategory if (isCategory) then print(params.test) -- error else print(params.test) -- no error end end tableView=widget.newTableView{top=0,left=0,width=320,height=480,onRowRender=onRowRender} tableView:insertRow({ isCategory=true, rowHeight=50, params={ ["test"]="test" } }) tableView:insertRow({ isCategory=false, rowHeight=20, params={ ["test"]="test" } })

As you can see the moment you pass params into a category row, it returns nil, if you set category to false it works just fine… I am using 2162… Also its related to this post:
http://forums.coronalabs.com/topic/38014-tableview-params-working-for-anyone/#entry230362

Not fixed yet. I hope its turn will come soon. 

for anyone trying to find a decent solution around this you can set this up to pass custom params to category:

local rowParams={} local function onRowRender(event) local row=event.row local rowID=row.id local isCategory=row.isCategory if (isCategory) then print(rowParams[rowID].user,rowParams[rowID].date) end end -- inside the loop that generates the rows for i=1,#whatever do local data={} data["user"]="corona" data["date"]="feb 11th" rowParams[i]=data tableView:insertRow({ id=i, isCategory=true, rowColor={default={1}}, rowHeight=40 }) end

Not fixed yet. I hope its turn will come soon. 

for anyone trying to find a decent solution around this you can set this up to pass custom params to category:

local rowParams={} local function onRowRender(event) local row=event.row local rowID=row.id local isCategory=row.isCategory if (isCategory) then print(rowParams[rowID].user,rowParams[rowID].date) end end -- inside the loop that generates the rows for i=1,#whatever do local data={} data["user"]="corona" data["date"]="feb 11th" rowParams[i]=data tableView:insertRow({ id=i, isCategory=true, rowColor={default={1}}, rowHeight=40 }) end