Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1574] Windows: ListSection when add an ItemTemplate appear a ghost element at position -1

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2015-12-22T08:51:34.000+0000
Affected Version/sAppcelerator Studio 4.4.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelswindows, windows8.1, windows_phone
ReporterLuca Sartori
AssigneeMostafizur Rahman
Created2015-12-12T12:17:23.000+0000
Updated2016-03-08T07:38:02.000+0000

Description

ListView example: When one or more itemtemplate are added to ListSection appears in first position an blank itemtemplate (same height of other) at position -1. The $.listsection.items.length if you add 2 elements give 2 as result but there is another element at position -1 (see pic).

Attachments

FileDateSize
windows_02.jpg2015-12-12T12:16:37.000+000050916

Comments

  1. Sharif AbuDarda 2015-12-15

    Hello [~luk3luk3], I wasn't able to reproduce the issue with your sample code. I made some changes on the code. Below is the code that i tried.
       <Alloy>
       	<Window id="win">
       		<ListView id="list" defaultItemTemplate="custom" onItemclick="handleClick" height="80%">
       			<Templates>
       				<ItemTemplate name="custom" height="80">
       					<View class="hcontainer">
       						<ImageView bindId="icon" id="item_icon"/>
       						<View class="vcontainer" left="10">
       							<Label id="item_title">Header View1</Label>
       						</View>
       					</View>
       				</ItemTemplate>
       			</Templates>
       			<ListSection id="listsection">
       				<ListItem title="List item 1"></ListItem>
       				<ListItem title="List item 2"></ListItem>
       				<ListItem title="List item 3"></ListItem>
       			</ListSection>
       		</ListView>
       	</Window>
       </Alloy>
       
    Please provide a full code which demonstrate the issue as u described. Thanks.

JSON Source