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

iOS: Rendering issue when deleting and re-adding row

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 3.4.0
    • Component/s: iOS
    • Environment:

      TiSDK 3.3.0.Beta, 3.2.3.GA
      iOS 7.1
      Ti CLI 3.3.0-beta
      OSX 10.9.2
      XCode 5.1

      Description

      There's one issue when row is being deleted and then re added.

      Ti.UI.setBackgroundColor("#fff");
       
      var win = Ti.UI.createWindow({
          top: 20,
          backgroundColor: "#ccc"
      });
       
      var table = Ti.UI.createTableView({
          top: 0,
          bottom: 0
      });
       
      var tableData = [];
       
      for (var i = 0; i < 10; i++) {
          tableData.push(Ti.UI.createTableViewRow({
              title: "Row " + (i + 1)
          }));
      }
       
      table.setData(tableData);
       
      win.add(table);
       
      //var newSection;
      table.addEventListener("click", function(e) {
       
          var row = table.data[0].rows[e.index];
       
          Ti.API.info('index');
          Ti.API.info(e.index);
          Ti.API.info(row.title);
          
          table.deleteRow(row);
          //Ti.API.info('delete an row');
          table.insertRowBefore(0, row);  
          //Ti.API.info('add an row');
          /*setTimeout(function() {
              table.insertRowBefore(0, row);
          }, 2); */
       
      });
       
      win.open();
      

      Base on the above code, the behave of delete and insert row will not work well. I think it is because when we do the delete action, the device page will still not refresh well, then the second action will not work properly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                sliang Shuo Liang
                Tester:
                Satyam Sekhri
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code