Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25903

Android: TableView.updateRow() not working in 7.1.0 if "run-on-main-thread" is false

    Details

      Description

      Updating a tableViewRow with updateRow method doesn't update desired row on Android using Titanium SDK 7.1.0.GA. It works fine on SDK 7.0.3.v20180226072443 and 6.3.1
      On iOS it works on every mentioned SDK.

      update: It is something regarding "run-on-main-thread". Having it turned off blocks row of being updated. Is there a reason for this?

      How to test it:

       
      var win = Ti.UI.createWindow({backgroundColor: 'white'});
       
      var rowData = [];
      var row = Ti.UI.createTableViewRow({
          height: 120,
          title: 'ROW #00'
      });
      rowData.push(row);
       
      var table = Ti.UI.createTableView({
          top: 50,
          height: 120,
          data: rowData
      });
      table.addEventListener( 'click', function(e) {
          console.log(' ***** click on table ');
      });
      win.add(table);
       
      var bt = Ti.UI.createButton({
          top: 200,
          title: 'UPDATE ROW'
      });
       
      bt.addEventListener('click',function(e){
          var newRow = Ti.UI.createTableViewRow({
              height: 120,
              title: 'NEW ROW'
          });
          table.updateRow(0,newRow);
      });
      win.add(bt);
       
      win.open();
      
      

      Expected result: Row on index 0 should be updated with a new one with the title "NEW ROW"
      Current result: First row is not updated and the click event is not fired at all

        Attachments

          Activity

            People

            • Assignee:
              ybanev Yordan Banev
              Reporter:
              chmiiller Carlos Henrique Zinato
              Reviewer:
              Joshua Quick
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6261
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code