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

Windows: Calling picker.reloadColumn removes all other columns

    Details

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

      Ti SDK: 6.1.2.GA, 6.2.0.v20170906064110, 7.0.0.v20170906135653

    • Story Points:
      5
    • Sprint:
      2017 Sprint 19 SDK

      Description

      Description

      When calling picker.reloadColumn, if there are multiple columns all other columns are removed

      var _window = Ti.UI.createWindow();
      var names = ['Joanie', 'Mickey', 'Jean-Pierre', 'Gustav', 'Raul', 'Mimi', 'Emily', 'Sandra', 'Carrie', 'Chachi'];
      var verbs = ['loves', 'likes', 'visits', 'loathes', 'waves to', 'babysits', 'accompanies', 'teaches', 'announces', 'supports', 'knows', 'high-fives'];
       
      var column1 = Ti.UI.createPickerColumn();
      for (var i = 0; i < names.length; i++) {
          column1.addRow(Ti.UI.createPickerRow({title: names[i]}));
      }
      var column2 = Ti.UI.createPickerColumn();
       
      for (i = 0; i < verbs.length; i++) {
          column2.addRow(Ti.UI.createPickerRow({title: verbs[i]}));
      }
      var column3 = Ti.UI.createPickerColumn();
      for (i = (names.length - 1); i >= 0; i--) {
          column3.addRow(Ti.UI.createPickerRow({title: names[i]}));
      }
      var picker = Ti.UI.createPicker({columns: [column1, column2, column3]});
      _window.add(picker);
      var btnRemove = Ti.UI.createButton({
          left: '5dp',
          height: '40dp',
          top: '100dp',
          title: 'reload'
      });
      btnRemove.addEventListener('click', function() {
          picker.reloadColumn(picker.columns[0]);
          console.log(picker.columns)
      });
      _window.add(btnRemove);
      _window.open()
      

      Steps to reproduce
      1. Add the code above to an existing app.js
      2. Click reload
      Actual

      two columns get removed

      Expected

      No columns removed

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code