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

Android: 7.1.0.RC - Setting data in Ti.UI.TableView does not work as before

    Details

    • Story Points:
      3
    • Sprint:
      2018 Sprint 05 SDK

      Description

      This is a regression from 7.0.2 to 7.1.0

      I have tried 7.1.0.RC

      It used to work properly in the past ...

      tableData[2] = tableViewSection3;
      tableView.data = tableData;
      

      However, now it only works this:

      tableView.updateSection(2, tableViewSection3);
      

      function createTableViewRow(e) {
      	
      	var rowView = Titanium.UI.createTableViewRow({
      		height: 120
      	});
      	
      	rowView.add(Titanium.UI.createLabel({
      		text:'Text',
      	}));
      	
      	return rowView;
      }
       
      var win = Ti.UI.createWindow();
       
      var tableData = [];
       
      var tableView = Titanium.UI.createTableView({
      	separatorStyle:Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE
      });
      	
      var tableViewSection1 = Ti.UI.createTableViewSection();
      var tableViewSection2 = Ti.UI.createTableViewSection();
      var tableViewSection3 = Ti.UI.createTableViewSection();
       
      tableData.push(tableViewSection1);
      tableData.push(tableViewSection2);
      tableData.push(tableViewSection3);
      	
      tableView.data = tableData;
      	
      win.add(tableView);
       
      var setData = function(e) {
       
      	tableViewSection3.add(createTableViewRow());
      	tableViewSection3.add(createTableViewRow());
      	tableViewSection3.add(createTableViewRow());
      	
      	//tableView.updateSection(2, tableViewSection3);
      	tableData[2] = tableViewSection3;
      	tableView.data = tableData;	
      	
      };
       
      win.addEventListener('open', function(e) {
      	setData();
      });
       
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              andreas.pingas Andreas Pingas
              Reviewer:
              Joshua Quick
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code