# Delay when touching tableview cells

**URL:** <https://forums.solar2d.com/t/delay-when-touching-tableview-cells/347374>\
**Category:** Widgets\
**Created:** [April 23, 2018, 10:43pm UTC](https://forums.solar2d.com/t/delay-when-touching-tableview-cells/347374 "2018-04-23T22:43:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdsmedeirosbr](https://forums.solar2d.com/user_avatar/forums.solar2d.com/jdsmedeirosbr/32/114_2.png) [@jdsmedeirosbr](https://forums.solar2d.com/u/jdsmedeirosbr)\
**Post date:** [April 23, 2018, 10:43pm UTC](https://forums.solar2d.com/t/delay-when-touching-tableview-cells/347374/1 "2018-04-23T22:43:03Z")

</div>

Hello, I created an app and inserted a tableView that works perfectly, however, when I click the cell, I call a new scene that sometimes this transition works, sometimes not! is a bug or wrong code?

Version used:&nbsp;2018.3276

Part of code…

```
local function onRowRender( event ) &nbsp; &nbsp; local row = event.row &nbsp; &nbsp; local id = row.index &nbsp; &nbsp; local imgTable = display.newImageRect( row,"images/EstrelaLogo.png", 40, 42 ) &nbsp; &nbsp; imgTable.anchorX = 0 &nbsp; &nbsp; imgTable.anchorY = 1 &nbsp; &nbsp; imgTable.x = 8 &nbsp; &nbsp; imgTable.y = row.height \* .5 &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; local text = display.newText(&nbsp; row, news[id], 12, 0, nil, 17 )--rowData[id] &nbsp; &nbsp; text.anchorX = 0 &nbsp; &nbsp; text.anchorY = 1 &nbsp; &nbsp; text.x = imgTable.x + imgTable.width + 8 &nbsp; &nbsp; text.y = row.height \* .65 &nbsp; &nbsp; text:setFillColor( 1, 1, 1 )&nbsp;&nbsp; &nbsp; &nbsp; local textDate = display.newText(&nbsp; row, dEdit[id] .. "/2018", 12, 0, nil, 13.5 )--rowDate[id] &nbsp; &nbsp; textDate.anchorX = 0 &nbsp; &nbsp; textDate.anchorY = 1 &nbsp; &nbsp; textDate.x = imgTable.x + imgTable.width + 8 &nbsp; &nbsp; textDate.y = row.height \* .35 &nbsp; &nbsp; textDate:setFillColor( 0, 0, 0 ) &nbsp; end local function onRowTouch( event ) &nbsp; &nbsp; local phase = event.phase &nbsp; &nbsp; local row = event.target &nbsp; &nbsp; if event.phase == "release" then &nbsp; &nbsp; &nbsp; --for i = 1, tableView:getNumRows() do &nbsp; &nbsp; &nbsp; &nbsp; --if i == row.index then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --else &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; composer.gotoScene("noticias",{effect = "fromRight", time = 300}) &nbsp; &nbsp; &nbsp; &nbsp; --end &nbsp; &nbsp; &nbsp; --end &nbsp; &nbsp; &nbsp; print(row.index) &nbsp; &nbsp; end &nbsp; end tableView = widget.newTableView( &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; left = 0, &nbsp; &nbsp; &nbsp; top = bar.y + bar.height, &nbsp; &nbsp; &nbsp; height = heighTBX - bar.y + bar.height, &nbsp; &nbsp; &nbsp; width = display.contentWidth, &nbsp; &nbsp; &nbsp; onRowRender = onRowRender,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hideBackground = true, &nbsp; &nbsp; &nbsp; onRowTouch = onRowTouch &nbsp; &nbsp; } &nbsp; ) &nbsp; sceneGroup:insert(tableView) &nbsp; for i = 1, 12 do &nbsp; &nbsp; tableView:insertRow{ &nbsp; &nbsp; &nbsp; rowHeight = 43, &nbsp; &nbsp; &nbsp; isCategory = false, &nbsp; &nbsp; &nbsp; rowColor = {default={1,1,1,0}}, &nbsp; &nbsp; &nbsp; lineColor = { 1, 1, 1 } &nbsp; &nbsp; }&nbsp;&nbsp; function scene:hide( event ) &nbsp; local sceneGroup = self.view &nbsp; local phase = event.phase &nbsp; if ( phase == "will" ) then&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elseif ( phase == "did" ) then &nbsp; &nbsp; composer.removeHidden() &nbsp; end end&nbsp;

```

Video here:

[https://www.facebook.com/jdsmedeiros/videos/1481242185318316/](https://www.facebook.com/jdsmedeiros/videos/1481242185318316/)
