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

Windows: list section instertItemsAt not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.0.0
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2016 Sprint 15 SDK

      Description

      I want to add row to the top pf the list (0 index of row), but instead of this section adding row to the end.

      index.xml:

      <Alloy>
          <Window id='win' backgroundColor="green">
      		  <ListView id="list" defaultItemTemplate="t">
      		  	<Templates>
      					<ItemTemplate name="t" >
      						<Label bindId="label" />
      					</ItemTemplate>					              
      			</Templates>
      		    <ListSection  id="section">
      		    </ListSection>
      		  </ListView>
      		  <Button backgroundColor='red' width='100dp' height='44dp' onClick='doClick' />
          </Window>
      </Alloy>
      

      index.js:

      function doClick(e) {
          $.section.insertItemsAt(0, [{label: {text: 'test4'}}]);
      }
       
      $.section.appendItems([
      	{label: {text: 'test1'}},
      	{label: {text: 'test2'}},
      	{label: {text: 'test3'}},
      ]);
       
      $.win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              zozo4kin Zakhar Zhuravlev
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code