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

Windows: index property of TableView click event should be index of whole TableView and not section

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.0.4, Release 6.1.2, Release 7.0.0, Release 6.2.0
    • Fix Version/s: Release 7.0.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      Ti SDk 6.0.4.GA, 6.1.2.GA, 6.2.0.v20170912203804, 7.0.0.v20170906135653

    • Story Points:
      3
    • Sprint:
      2017 Sprint 22 SDK, 2017 Sprint 23 SDK

      Description

      Description

      The index property of a tableview click event is in relation to the tableviewsection, it should be in relation to the entirety of the tableview

      var win = Ti.UI.createWindow();
       
      var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
      sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));
      sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));
       
      var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
      sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
      sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
       
      var table = Ti.UI.createTableView({
          data: [sectionFruit, sectionVeg]
      });
       
      table.addEventListener('click', function (e) {
          alert(e.index);
      });
       
      win.add(table);
      win.open();
      

      Steps to reproduce
      1. Add the above to an existing app.js and build for Windows
      2. Click Row 10 in section 2
      Actual

      Row 0 in Section 1 gets updated

      Expected

      Row 10 in section 2 should be updated

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Gary Mathews
                Tester:
                Josh Longton
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code