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

Parity: ListItem properties set to undefined/null have inconsistent results on iOS and Android

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.1.0
    • Component/s: TiAPI
    • Labels:
    • Environment:

      Tested on SDK 5.2.0/iOS 9/Android 5

    • Story Points:
      8
    • Sprint:
      2017 Sprint 02 SDK

      Description

      index.xml

      <Alloy>
      	<Window class="container">
      		<ListView defaultItemTemplate="template">
                  <Templates>
                      <ItemTemplate name="template" accessoryType="Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE" backgroundColor="red">
                          <Label bindId="title" />
                      </ItemTemplate>
                  </Templates>
      			<ListSection id="listsection1" />
      		</ListView>
      	</Window>
      </Alloy>
      

      index.js

      $.index.open();
       
      var listitem = {
      	properties:{
      		accessoryType: undefined,
      		backgroundColor:undefined
      	},
      	title:{text:'List Item Title'}
      };
      $.listsection1.setItems([listitem]);
      

      On iOS, the properties fall back to the values set in the template. On Android, the properties fall back to the default values.

      This is inconvenient for cross-platform development.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              shawnlan Shawn Lan
              Reviewer:
              Gary Mathews
              Tester:
              Samir Mohammed
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration