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

Windows: Add support for template.events

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.1
    • Fix Version/s: Release 6.2.0
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      2017 Sprint 14 SDK

      Description

      • Add support for setting template item events using the template.events property

      TEST CASE

      var win = Ti.UI.createWindow({ backgroundColor: 'white' }),
          list = Ti.UI.createListView({
              templates: {
                  template: {
                      events: {
                          click: onClick
                      },
                      childTemplates: [
                          {
                              type: 'Ti.UI.Label',
                              bindId: 'title',
                              properties: {
                                  left: '5dp',
                                  right: '5dp'
                              }
                          }
                      ]
                  }
              },
              defaultItemTemplate: 'template'
          }),
          section = Ti.UI.createListSection(),
          items = [];
       
      function onClick(e) {
          alert('CLICK!');
      }
       
      for (var i = 0; i < 5; i++) {
          items.push({
              title: { text: 'TEXT' }
          });
      }
      section.setItems(items);
      list.setSections([section]);
       
      win.add(list);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gmathews Gary Mathews
              Reviewer:
              Kota Iguchi
              Tester:
              Samir Mohammed
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code