Hello.
I want to change in tableView click event the background of this row. This is my code:
tableView.addEventListener('click', function(e) { var fila = e.row; if (fila.desplegado == 0){ fila.backgroundImage = '/images/filacat.png'; fila.desplegado = 1; e.row = fila; } else { fila.backgroundImage = '/images/filacat1.png'; fila.desplegado = 0; e.row = fila; } }The first time I click the table, nothing happens. :( But the next time i click it's works.
Is it a bug??
Somebody help me? It's an iOS App.
Thanks.
2 Answers
Is it that you don't initialize "fila.desplegado" until after a click has already taken place? Try initializing the value on row creation to your preferred default value.
See this Link, i think it will help you...
Your Answer
Think you can help? Login to answer this question!