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

iOS: TableView: Appending row immediately after a section appends them before the section

    Details

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

      MacOS 10.13.3 (17D102)
      Ti SDK 7.1.0.GA
      Appc NPM 4.2.12
      Appc CLI 7.0.2
      Xcode 9.3 (9E145)

    • Story Points:
      1

      Description

      In a TableView, when appending a row immediately after appending a section, the elements appear in the reverse order (row and then section).

      Steps to reproduce issue:
      1. Create a classic app with the below code
      2. Run the app

      Expected Results:
      Each section has 3 rows under it

      Actual Results:
      All of the rows appear first, then the sections

      Notes:
      In the example, you can click on the window to add another section and row that also appear in reverse order.

      var win = Ti.UI.createWindow({ backgroundColor: "#f00" });
      var table = Ti.UI.createTableView();
       
      for (var i = 0; i < 2; ++i) {
      	table.appendSection(Ti.UI.createTableViewSection({ headerTitle: "Header " + i, className: "Header" }));
          for (var j = 0; j < 3; j++) {
          	table.appendRow(Ti.UI.createTableViewRow({ title: "Row " + j, className: "Row" }));
          }
      }
       
      win.addEventListener("click", function() {
      	table.appendSection(Ti.UI.createTableViewSection({ headerTitle: "Title", className: "Header" }));
      	table.appendRow(Ti.UI.createTableViewRow({ title: "Row ", className: "Row" }));
      });
              
      win.add(table);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              ewieber Eric Wieber
              Reviewer:
              Eric Wieber
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code